Google Tag Management Quickstart
The examples in this section apply specifically to Google Tag Manager (GTM). The ADARA Privacy Token SDK can be similarly implemented in any TMS solution such as Tealium, Adobe Launch, Signal, Ensighten, TagCommander, etc.
Create a Custom Tag
In Google Tag Manager (GTM), use the following six steps to create a New Tag.
- Choose New Tag.
- In Tag Configuration, choose Custom HTML Tag for Tag Type.
- Add the JavaScript code snippet in the HTML textbox.
- Select the Firing Triggers for the tag. Our general recommendation is to fire on all page views, but the above example tag would likely be triggered by a “form submission” trigger.
- Save the new tag by submitting your changes in GTM.
- Publish the tag when you are ready to deploy it.
Examples
There are built-in variables and user-defined variables in Google Tag Manager. Here is an example of user-defined variables:

GTM: page shows user defined variables that map to the data layer
Here is an example of the code snippet. This would be typical of a form submission for registration or sign-up. Note that the variables for email and zip code are passed through the identity
method. Please contact the Adara Technical Consultant team at tc-global@adara.com for the possible values to pass to this method.
<script>
window.adara = window.adara ||
function () {
(window.adara.q = window.adara.q || []).push(arguments);
};
adara('init', 'REPLACE_API_KEY', 'REPLACE_DP_ID');
//set init method with API Key
adara('identity', { 'email':{{email}},
'zip_code':{{zip}}
});
//set identity elements
adara('send', { 'referrer':{{referrer}},
'city':{{city}},
'state':{{state}},
'country':{{country}}
});
//transmit data to ADARA for referrer, city, state, country
</script>
<script async src="https://js.adara.com/index.js">
//calls ADARA JS file.
</script>
As a best practice, pass Personal Identifiable Information (PII) like email as a SHA-256 hash email. While email can be passed in clear text, ADARA will not store it as clear text so your data is secure and user privacy is protected.
Pass the Data Partner ID (DP_ID) as an integer. If it is stored as an string locally, be sure to convert it to a string prior to passing it to ADARA.
Here is an example of that same code snippet in GTM:

GTM: **Trigger** window with example selections](https://uploads.developerhub.io/prod/joyJ/4b3litg5degg31dk9eq8f0xuzlni0f4wxa1pdufy3s0iafya52hcx1vxajev8scp.png)
GTM: Tag Configuration window with example code
GTM: Trigger window with example selections