ClickTag for Google Ad Manager

Hi !
I need help to export for Google Ad Manager. I have the following instructions but I can’t figure out where to put these ids or functions in Hype. When I export, the function seems to go in the .js file. I need help / advice or export script.

Here are the instructions I received from the ad platform :

Banner Element

Function
var clickTag = “[URL]”;
var obj = document.getElementById("[dccbc300x250enr3_hype_container]");
if (obj.attachEvent) {
obj.addEventListener(‘onclick’, function() {window.open(window.clickTag,"_blank");});
} else {
obj.addEventListener(‘click’, function() {window.open(window.clickTag,"_blank");}, false);
}

Thanks a lot ! Sorry for my inaccurate English writing skills.

It would probably be good to know the full instructions and where you are getting them from?

You could probably put that in the head HTML, enclosed within a <script> tag. However it does require knowing the correct container name ahead of time, so you probably want to do this in the export version (and not via the ‘Edit Head HTML’ button unless you are sure to name the export a specific way).

Also note that Hype does have an export script for google ads (Doubleclick campaign manager) that can automate a lot of this:

Would it be possible to create an Export Script for Google Ad Manager as well?
The specs are pretty simple. Editing the final HTML-files is a bit of a hassle when producing large amounts og ads.

Specs: https://support.google.com/admanager/answer/7046799?hl=en

Google keeps changing the name of its ad systems and I think we just need to catch up :slight_smile:. From looking at those docs, it should be that the "DoubleClick Campaign Manager" export script is the one to use. It adds the meta ad.size, sets a clickTag via the Document Inspector, and allows for clickTag call via the new Exit action.

If you encounter problems using this for Google Ad Manager, let us know!