This is the code they provided:
<script type="text/javascript">
function getParameterByName(name)
{ name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); }
var clickTag = getParameterByName("clickTag");
</script>
Were you able to find the solution? I have a client for whom I just built 15 HTML5 banners, but he is trying to use them in The Trade Desk environment. So the same script was sent to me, and I added it as a custom event, but the client still can't upload the banners. There is not much on the web about the same issue, so I was wondering if you were able to solve it.
Thank you,
Veronika
It's 2 steps:
1. Add a custom function to your Tap Area in GWD Events. I called mine "clickThru" but this doesn't really matter as much as the code in the function.
---
window.open(clickTag);
---
2. Add the following script just before the closing </body> tag:
---
<script type="text/javascript">
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var clickTag = getParameterByName("clickTag");
</script>
---
That worked for me. Hope it does for you as well.