Dynamic Variables Tag

Dynamic vars are additional information on the session that can be used to segment users.

For example, they can include information on the A/B Test variations displayed to the current user.

Unlike custom vars, dynamic vars can be sent at any time during a session and do not require to send a pageview.

For more information, see Dynamic Vars.

  1. Open your container and go to the templates section.

  2. Select Search Gallery.

  3. Type in contentsquare and select the Contentsquare - Dynamic variables option.

  4. Click Add to workspace.

  5. Confirm your choice by selecting Add

  6. Go to the Tags section and click the New button to create a new tag.

  7. Configure it by selecting the top-right button.

  8. Search for contentsquare and select the Contentsquare - Dynamic variables template that you’ve previously added to your container.

  9. Give a title to the tag and input your Tag ID in the dedicated field.
    For each dynamic variable, enter:

    • The key
    • The value
    • The type - Number or String.

  10. Select the trigger: All Pages or DOM Ready (when data layer has been fully loaded).

  11. Save your changes and go back to your container. You should now see both the template and the newly created tag.

  1. Within Tag properties, select Rules > Add Rule.

  2. Specify a name, events, and conditions.

  3. Add an Action with the following settings:

    • Extension: Contentsquare,
    • Action Type: Dynamic Variables,
    • Name: Contentsquare - Dynamic Variable tracking.
  4. On the right-hand side, select Add New Variable.

  5. For each dynamic variable, enter:

    • The key
    • The value
    • The type - Number or String.

  6. Select Keep Changes > Save.