Many of our templates support HTML creatives (banners).
These creatives should be hosted on your servers and used via a hosted URL.
⚠️ Note: Google Ad Manager (GAM) does not allow uploading an HTML creative (ZIP bundle) directly when adding a creative from a template.
Since our templates serve HTML creatives via URLs, clickTAG values are passed through the URL. Therefore, the HTML creative itself must be able to read clickTAG values from the URL in order to handle correct click-through URLs and click tracking.
To ensure proper click tracking with HTML creatives, templates include the following fields:
⚠️ Keep in mind that these variables are case-sensitive (clickTag and clickTAG are treated as different variables).
If you want to provide multiple click URLs and clickTAG variables, separate them with a vertical bar (|).
For example:
https://www.genecy.com|https://www.genecy.com/gam/release-notes/
clickTag1|clickTag2
That completes the template-side setup.
However, the HTML creative itself must support reading clickTAG values from the URL. If it doesn’t, you will need to either modify the creative code or ask the creative provider to implement this functionality.
You can implement clickTAG reading from the URL in two common ways:
When adding a click event for a tap area in GWD, use a custom action.
We have a step-by-step guide here: How to add clickTAG to banners in Google Web Designer
If you see lines like:
var clickTag = 'https://test-click.com/';
…then clickTAG variables are defined globally.
In that case, insert the following JavaScript code before the closing </body> tag:
<script>
(function() {
const url = new URL(window.location.href);
for (const [key, value] of url.searchParams.entries()) {
if (typeof window[key] === 'undefined') {
continue;
}
window[key] = value;
}
})();
</script>
This script replaces the predefined clickTag
variables with the values provided via the template form (i.e., from the click-through URLs passed in the URL).