Extensions provide a user-friendly interface to add customizations to your data layer and tags without the need for coding. Extensions are used for a variety of purposes, such as modifying data layer values, setting cookies, and even setting up click tracking.

In this article:


The effects of extensions and when they run are based on the scope they’re assigned to.

For example, the default scope After Load Rules will run the extension after the load rules are evaluated. This occurs before the browser signals that the page is DOM Ready and before tags run.

Additional information about available scopes can be found in this guide.

Order of Operations

To get familiar with extensions, it is important to understand the order of operations of the main components of iQ Tag Management and when the "All Tags" scope occurs. The following is a simplified order of the operations that shows when the data layer is processed by each component.

  1. Page loads the following:
    • Universal Data Object – utag_data
    • Universal Tag – utag.js
  2. Universal Tag (utag.js) runs the following:
    • Data Layer variables are evaluated (cookies, meta, query string, etc.)
    • Load Rules are evaluated
    • "All Tags" extensions run
    • "After Load Rules" extensions run
    • Tags run
      • "Tag Scope" extensions run
      • Tags fire

There are additional scopes (for example, Pre Loader, DOM Ready) that are used for more advanced scenarios.

Additional details about these settings can be found at the end of this guide.

Now that you know a little about extensions, you can set up your first extension and see it in action.

Add an Extension

A common use for extensions is to set a default value for a data layer variable. This requires setting the value of a variable – but only if it does not already have a value. In this step you will use the Set Data Values extension to set page_name to the value of a built-in variable named document title – but only if page_name does not have a value.

Use the following steps to add this extension:

  1. In the sidebar, select iQ Tag Management > Extensions.
  2. Click + Add Extension.
  3. Under the Standard Data tab, click + Add next to Set Data Values.
  4. In the Title field, enter Default Page Name to identify your extension.
  5. In the Scope field, keep the After Load Rules (default) default value.
  6. Under Configuration, apply the following settings:
    • Use the drop-down list in the Set field to select the Page Name variable.
    • In the To field, select Variable.
    • In the variables drop-down list, select document title.
    • Under Condition, click Add Condition.
    • Use the drop-down list to select the Page Name variable.
    • In the next field, use the drop-down list to select is not populated.

That's it! Your extension is configured. This extension ensures that if your data layer does not contain a value for the page_name variable, then the value of document title will be used instead. This is just one example of an extension. Be sure to explore the other extensions.

The next step is to learn about of saving and publishing your work.