Documentation

Counting clicks in publisher ad servers

Introduction

In some cases an e-planning tag is sent to a publisher who has his own ad server. Usually, e-planning will count impressions and clicks but the publisher will only be able to count impressions with his ad server. This document explains how to implement a tag that will allow the publisher to also track clicks on his ad server.

Changes to the tag

For the publisher to count clicks, a variable must be added to e-planning's tag. The variable is called 3pct and its value must be the URL of the publisher's ad server. We provide an example for Javascript tags, but the same instructions apply to IFRAME or Image tags:

Standard e-planning Javascript tag

<script type="text/javascript" language="JavaScript1.1">
var rnd = (new String(Math.random())).substring(2,8) + (((new Date()).getTime()) & 262143);
document.write('<scri' + 'pt language="JavaScript1.1" type="text/javascript"
src="http://ads.us.e-planning.net/eb/3/001/916443da5f5a8faf?o=j&rnd=' + rnd + '"></scr' + 'ipt>');
</script>
<noscript><a href="http://ads.us.e-planning.net/ei/3/001/916443da5f5a8faf?it=i&rnd=$RANDOM" target="_top"><img
alt="e-planning.net ad" src="http://ads.us.e-planning.net/eb/3/001/916443da5f5a8faf?o=i&rnd=$RANDOM"
border=0></a></noscript>

Javascript tag with external click tracking

<script type="text/javascript" language="JavaScript1.1">
var rnd = (new String(Math.random())).substring(2,8) + (((new Date()).getTime()) & 262143);
document.write('<scri' + 'pt language="JavaScript1.1" type="text/javascript"
src="http://ads.us.e-planning.net/eb/3/001/916443da5f5a8faf?o=j&3pct=http://other.ad.server/click&rnd=' + rnd + '"></scr' + 'ipt>');
</script>
<noscript><a href="http://ads.us.e-planning.net/ei/3/001/916443da5f5a8faf?it=i&rnd=$RANDOM" target="_top"><img
alt="e-planning.net ad" src="http://ads.us.e-planning.net/eb/3/001/916443da5f5a8faf?o=i&rnd=$RANDOM"
border=0></a></noscript>

As can be seen, the only difference is the addition of the 3pct variable in the parameters.

Important: if the publisher's click tracking URL has variables and includes the ? or & signs, the URL must be encoded before adding it to e-planning's tag. To do so, our URL encoding script can be used.

Example with variables

If the click tracking URL from the other ad server is http://other.ad.server/click?site=123&space=456, it is necessary to encode it before adding it to e-planning's tag, which gives: http://other.ad.server/click%3fsite%3d123%26space%3d456. Only the ? and & signs are replaced. The rest of the characteres can also be encoded, but is is not necessary. The resulting tag will be:

<script type="text/javascript" language="JavaScript1.1">
var rnd = (new String(Math.random())).substring(2,8) + (((new Date()).getTime()) & 262143);
document.write('<scri' + 'pt language="JavaScript1.1" type="text/javascript"
src="http://ads.us.e-planning.net/eb/3/001/916443da5f5a8faf?o=j&3pct=http://other.ad.server/click%3fsite=123%26space=456&rnd=' + rnd + '"></scr' + 'ipt>');
</script>
<noscript><a href="http://ads.us.e-planning.net/ei/3/001/916443da5f5a8faf?it=i&rnd=$RANDOM" target="_top"><img
alt="e-planning.net ad" src="http://ads.us.e-planning.net/eb/3/001/916443da5f5a8faf?o=i&rnd=$RANDOM"
border=0></a></noscript>

» MORE INFORMATION

   ©1998-2015 Caraytech S.A. All rights reserved.