- Drag a new
Tap Areacomponent 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 Areaand selectAdd Event. Next, under theTap Areadropdown, selectTouch/Click. - In the Action section, under the
Customdropdown, select theAdd custom action. - Name the function
clickEventand 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>