Skip to main content

RoktTemplate

Integrating via the Rokt Tag Template

Tag template setup

  1. Add the Rokt Tag Integration template to your website.
  • Within your Google Tag Manager Container navigate to Templates.
  • Select Search Gallery.

Test GTM

  1. Search for Rokt and select the Rokt Tag Integration.

Test GTM

  • Click Add to workspace.

Test GTM

  1. Configure the Tag template, setting up the data attributes and firing rules.
  • Choose Tags and select New.

Test GTM

  • Name the tag “Rokt Tag Template”, then select Tag Configuration.
  • Scroll to the Custom section and choose the Rokt Tag Template.

Test GTM

  1. Configure your account details and preferences.
  • Enter your Rokt Account ID, provided by your Rokt account manager.
  • Ensure the sandbox checkbox is selected.
  1. Configure your data attributes.
  • For each of the attributes click the add icon beside the text box to expand the list of attributes in your data layer.
  • Choose the appropriate variable in your data layer for the appropriate field. For example, click the add icon for the email field and then select the correct email variable in your data layer.
  • Once connected you should see your variable name appear in the input box (see circle #1 in the image below).
  • If the appropriate variable is not showing in your data layer check out our documentation on setting up attributes in the Google Tag Manager data layer here, and check with your Rokt account manager for next steps.

Test GTM

  • Add a Page Identifier under Advanced.

Test GTM

  1. Configure a trigger to determine when the Rokt Tag Template should fire. Click on Triggering rules to add one.
  • If your webapp is a Single Page Application (Created with React, Angular, Vue, ...) Click the plus on the top right and then choose a trigger type of History Change.

    Test GTM

    • Change the trigger firing rules to “Some History Changes”.
    • Enter the URL parameter that identifies the page where the tag should fire. For example, if your confirmation page is example.com/cart/payment/shipping the identifying parameter can be any of cart, payment, or shipping.
    • Click Save.

Test GTM

  • If your webapp is not a Single Page Application, Click the plus icon in the top right to create a new trigger, name it and choose a trigger type of Page View.

    Test GTM

    • Change the trigger firing rules to “Some Page Views".
    • Enter the URL parameter(s) that identify each unique page where the tag should fire. For example, if your confirmation page is example.com/cart/payment/shipping the identifying parameter can be any of cart, payment, or shipping.
    • Click Save.
    • Click Save.

Test GTM

  1. Save the Rokt Tag Template.
Was this article helpful?