Skip to main content

Integrating the Rokt ID

note

The following are instructions to integrate Rokt ID on your landing page with Google Tag Manager. If you'd like more information on Rokt ID, please see here.

If you'd like to integrate the Rokt ID on your landing page directly, please see this integration guide.

Integrating the Rokt ID with Google Tag Manager#

  1. From Google Tag Manager, go to Tags.

  2. Click New, then Tag Configuration. rokt-id-2

  3. For tag Type, select Custom HTML.

  4. Add in the Rokt ID tag snippet by pasting the following into the HTML field: <script src="https://apps.rokt.com/integrations/referral-tag/referral-tag.js" async></script> rokt-id-3

  5. Setup a trigger to fire the Rokt ID tag on the correct page. This will most likely be your landing page.

    1. Click the Plus icon in the top right to create a new trigger and then name it. If your webapp is a Single Page Application, choose the trigger type History Change, otherwise pick Page View. rokt-id-4
    2. Change the trigger firing rules to Some History Changes or Some Page Views.
    3. Change the condition to Page URL contains and enter the URL provided to you by your Rokt account manager.
    4. Click Save. rokt-id-5
  6. Save the Rokt ID tag and publish. rokt-id-6

Testing and validation#

  1. From Google Tag Manager go to your workspace and choose Preview.

    1. Enter the URL of your site.
    2. Choose Connect. This should open a new window running the newly set up Rokt ID tag. rokt-id-7
  2. Copy the URL of the newly opened window and forward this to your Rokt account manager. They perform the testing and QA for the Rokt ID tag integration.

Integrating Rokt ID tag on the conversion page#

With the Rokt ID tag successfully implemented on your landing page, the unique identifier is stored as a first-party cookie. When a customer completes a conversion event, the Rokt Web SDK retrieves the unique Rokt ID and attributes conversion.

We recommend installing the Rokt Web SDK using the Rokt Google Tag Template if Google Tag Manager is in use. Otherwise, please integrate the Rokt Web SDK directly on-page.

GDPR and CCPA Compliance#

Under the GDPR or ePrivacy, any website that uses cookies or tracking technology must obtain user consent. Advertisers should ensure consent is obtained when using the Rokt ID solution, and should block the Rokt script from running where users have opted out of cookies or tracking technology in order to meet their compliance obligations.

Under the CCPA, covered businesses must disclose to users details of the use of such technology.

Cookie consent can be implemented with any Consent Management Platform or Tag Manager, including Google Tag Manager. If other conversion attribution tags are conditionally allowed based on cookie consent, please implement the Rokt ID tag in a similar fashion. If the Rokt ID tag is the first which needs to be conditionally turned off and you are unsure of how to implement it, please reach out to your Rokt account manager.

For more information on the Rokt ID solution described in this section, please refer to our Cookie Policy.

Was this article helpful?