I have built a HTML5 ad so I can display a different image for different viewport widths which works fine. Within the ad I define a `var clickTag="target url goes here";` which is used by my onclick handler. I was under the impression that the value would be swapped out for the tracking url when the ad was served? i.e. I expected an `adplugg.com....` url so clicks can be monitored.
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script type="text/javascript">var clickTag = "url goes here";</script>
<style>...</style>
</head>
<body>
<a
class="ad-wrapper"
rel="nofollow" target="_self" href="javascript:void(0)" onClick="window.open(clickTag, '_blank');"
alt=""
>
<div class="ad-image"></div>
</a>
</body>
</html>
Many Thanks