star cross menu chevron-down

QA Container

The Nantu QA Container simplifies previewing and testing changes in a controlled environment, addressing limitations of the default Google Tag Manager (GTM) preview feature, which can sometimes be unreliable and slow. This component loads a secondary GTM container whenever the query variable nantu_environment is set to qa.

By using the QA container, you can publish tests in a dedicated environment and preview them by simply appending the query variable to your URL. To ensure proper functionality, you need to add a condition to every test where the Correct Environment variable is set to yes.

Components of the QA Environment #

  1. Correct Environment
  • A variable with two possible values: yes or no.
  • Ensures tests run only in the intended environment.
  1. Environment Type of This Container
  • A constant variable defining the current GTM container’s type as either production or qa.
  1. Nantu – QA Environment
  • A trigger that activates loading of the secondary GTM container.
  1. Nantu – Set Environment Cookie
  • A tag that sets a cookie to persist the QA environment selection.
  1. Nantu Environment Query Var
  • A variable that extracts the value of the nantu_environment query parameter.
  1. Nantu Environment
  • A variable that determines whether the current environment is qa or production.
  1. Nantu Environment Cookie
  • A variable that retrieves the value of the environment cookie.
  1. Nantu Environment Query and Cookie
  • A variable that combines values from both the environment cookie and query parameter.
  1. Nantu Has Environment Query Var
  • A trigger that checks whether the nantu_environment query parameter is set to qa.
  1. QA Container
    • A tag containing the GTM snippet code for the secondary QA container.

Summary #

The Nantu QA Container provides a robust and efficient method to preview and test changes without interfering with your production environment. By leveraging its components, you can easily manage and switch between QA and production setups while ensuring that tests are executed under the correct conditions.

Doc Feedback
Updated on December 11, 2024