- Drag a new
Tap Area
component into the scene and make sure it’s on the top layer. - Resize the layer to match the banner dimentions and rename it
tradeDeskClickTag
. (After setup is done, you can hide and lock this layer) - Right click the
Tap Area
and selectAdd Event
. Next, under theTap Area
dropdown, selectTouch/Click
. - In the Action section, under the
Custom
dropdown, select theAdd custom action
. - Name the function
clickEvent
and the paste the following JavaScript code in the textarea:
window.open(window.clickTAG)
- Finally, enter the "Code View" mode and paste the following JavaScript snippet right before the close
</head>
tag:
<script type="text/javascript" charset="utf-8">
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>