Integrating the Rokt ID with Google Tag Manager
From Google Tag Manager, go to Tags.
Click New, then Tag Configuration.
For tag Type, select Custom HTML.
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>
Setup a trigger to fire the Rokt ID tag on the correct page. This will most likely be your landing page.
- 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.
- Change the trigger firing rules to Some History Changes or Some Page Views.
- Change the condition to Page URL contains and enter the URL provided to you by your Rokt account manager.
- Click Save.
Save the Rokt ID tag and publish.
Testing and validation
From Google Tag Manager go to your workspace and choose Preview.
- Enter the URL of your site.
- Choose Connect. This should open a new window running the newly set up Rokt ID tag.
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.
GDPR and CCPA Compliance
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.