In order to be able to track Conversion Events on your website you will need to install 2 pieces of tracking code. A Google Global Tag, and a Google Event Tag.
NOTE: The tracking codes below are for demonstration only. If you’ve requested the Conversion Tracking Event code for your new campaign, use the code provided in the email or adgoji platform to setup tracking.
1. Installing the Google Global Tag
The Google Global tag sets new cookies on your domain, which will store a unique identifier for a user or the ad click that brought the user to your site. You must install this tag on every page of your website if you have not done this before.
a. No Google Global tag installed on your site:
Please the code in the header of every page on the website between the <head> and </head> tags.
An example code:
<!-- Start of global snippet: Please do not remove
Place this snippet between the <head> and </head>
tags on every page of your site. -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=DC-xxxxxxxx"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'DC-xxxxxxxx');
</script>
<!-- End of global snippet: Please do not remove -->
b. If there is Google Global Tag installed on your site:
If you already have installed a Google Global Tag before, you can configure it to refer to your new Google Global Tag without having to reinstall the Google Global Tag.
Let’s use an example of a Google Global Tag already installed on a website. The Google Global Tag would look like this:
<!-- Google Tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'GA_TRACKING_ID');
</script>
To add support for your adgoji tracking configuration, you don’t need to add a second Google Global Tag to your site. Just add the highlighted config command to your existing Google Global Tag on every page to your site:
<!-- Google Tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script><script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', 'GA_TRACKING_ID');
gtag('config', 'DC-1234567');
</script>
2. Google Event Tag
Place the code in the body of the page you want to track between the <body> and </body> tags.
An example code:
<body>
<!--
Event snippet for Test adgoji floodlight activity www.adgoji.com on:
Please do not remove.
Place this snippet on pages with events you’re tracking.
Creation date: 07/18/2024 -->
<script>
gtag('event', 'conversion', {
'allow_custom_scripts': true,
'send_to': 'DC-12345678/book-0/testa00+unique'
});
</script>
<noscript>
<img src="https://ad.doubleclick.net/ddm/activity/src=14674857;type=book-0;cat=testa00;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};ord=1;num=[Random Number]?" width="1" height="1" alt=""/>
</noscript>
<!-- End of event snippet: Please do not remove →
…..
</body>
Comments
0 comments
Please sign in to leave a comment.