clickTag for The Trade Desk on Generic Banner ads

2,308 views
Skip to first unread message

visio...@gmail.com

unread,
Dec 9, 2015, 11:28:18 AM12/9/15
to Google Web Designer beta
I am using a Tap Area component and my client is using The Trade Desk and they are not seeing any clicks and have asked that I add the following to the creative to make it work, but I can't figure out what I need to chnage to make it work.

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>

veronik...@gmail.com

unread,
Mar 28, 2016, 7:52:02 PM3/28/16
to Google Web Designer beta
Hello,

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

visio...@gmail.com

unread,
Mar 29, 2016, 9:54:06 AM3/29/16
to Google Web Designer beta
Yes, I did find a solution.

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.

kh...@borncreative.com.au

unread,
Oct 13, 2016, 12:43:18 AM10/13/16
to Google Web Designer beta
Thanks so much. this helped a lot =)
Reply all
Reply to author
Forward
0 new messages