Google Clicktag
Clicktag is an ad engine-specific piece of script that ensures that each click on a banner is tracked and counted. DELFI is transitioning to Google Ad Manager; in some ad types we are using Google clicktag. Read more here.
Implementation may vary depending on banner requirements and platform.
<script>
clickTag = "https://www.yourdomain.com"
</script>
Adding clickTAG window
To make the entire banner clickable:
1. Add clickTag to the head:
<script>
clickTag = "https://www.yourdomain.com"
</script>
2. Add this inside the body:
<script>
document.body.addEventListener('click', function () {
window.open(clickTag, '_blank');
});
</script>
Adding a clickTAG to a particular div
1. Add clickTag to the head:
<script>
clickTag = "https://www.yourdomain.com"
</script>
2. Add an element with id clickLayer:
<div id="clickLayer"></div>
3. Bind the click event:
<script>
var clickArea = document.getElementById('clickLayer');
clickArea.onclick = function () {
window.open(clickTag, '_blank');
}
</script>
This allows GAM to dynamically update clickTag URL without republishing.
Multi Clicktag
1. Define multiple clickTags (clickTag, clickTag1, etc.) and assign to different urls in head tag:
<script>
var clickTag = "https://www.yourdomain.com/1";
var clickTag1 = "https://www.yourdomain.com/2";
</script>
2. Add separate onclick handler for each clickable element.
<script>
var clickArea = document.getElementById('clickLayer');
var clickArea2 = document.getElementById('clickLayer2');
clickArea.onclick = function () { window.open(clickTag, '_blank'); }
clickArea2.onclick = function () { window.open(clickTag1, '_blank'); }
</script>
Redirect Clicktag
This is used in XML-feed banners where the clickTag URL can dynamically change without new banner upload or review. Ideal for updating links/images/text via external data source.
Advanced clickTag usage
For dynamic or advanced implementations, please contact us.