Click Tracking
PointRoll Ad tags allow tracking of clicks via two JavaScript variables defined at the very beginning of the tag (pr_redir & pr_redir_def) as follows:
var pr_redir='$CTURL$';
var pr_redir_def='~';
Setting these variables are the only changes that are needed to track clicks and are the only changes that should be made within the <script> section of a PointRoll tag.
Tracking Clicks for the PointRoll Ad Unit (pr_redir)
To track clicks on the PointRoll ad unit banner, ADD the click-thru redirect URL (including the http://) into the value of the
pr_redir variable. The initial value of the
pr_redir variable must be placed in the redirect URL where the URL format accepts the final destination URL. Also, see the
Encoding Note below.
PointRoll's Ad Delivery System variable replaces
$CTURL$ with the correct final destination URL at ad delivery time, so the click's HREF will go through the specified redirect(s) and then onto the advertiser's destination URL.
Some Examples:
Assume that the publisher redirect is...
http://www.myserver.com/click/?final_destination_URL
If the original value of the pr_redir variable when the tag was received is...
var pr_redir='$CTURL$'
Then the value of the pr_redir variable should be set to:
var pr_redir='http://www.myserver.com/click/%3F$CTURL$';
But if the original value of the pr_redir variable when the tag was received is...
var pr_redir='http://www.URL.com/%3F$CTURL$'
Then the value of the pr_redir variable should be set to:
var pr_redir='http://www.myserver.com/click/%3Fhttp://www.URL.com/%3F$CTURL$';
|
Tracking Clicks for the PointRoll Ad Unit Default Ad (pr_redir_def)
When tracking clicks on defaults separately, set
pr_redir_def to the default redirect URL placing
pr_redir_def's initial value in the position where the final destination URL belongs. If the initial value was = '~', then replace the
~ with
$CTURL$ instead. Also, see the
Encoding Note below.
For example:
Assume that the richmedia publisher redirect is...
http://www.myserver.com/click1/?final_destination_URL
But that the publisher redirect for the default is...
http://www.myserver.com/click2/?final_destination_URL
And the pr_redir variable was initially = '$CTURL$' and pr_redir_def was = '~', then the redirect variables in your tag should be set as follows:
var pr_redir='http://www.myserver.com/click1/%3F$CTURL$';
var pr_redir_def='http://www.myserver.com/click2/%3F$CTURL$'; |
When not tracking clicks on defaults seperately, just leave the
pr_redir_def value = '~' and the
pr_redir value will apply to all clicks.
For example:
Assume that the publisher redirect is...
http://www.myserver.com/click/?final_destination_URL
And it's the same redirect for both richmedia and default, and the pr_redir variable was initially = '$CTURL$', then the redirect variables in your tag should be set as follows:
var pr_redir='http://www.myserver.com/click/%3F$CTURL$';
var pr_redir_def='~';
|
Encoding Note: When setting a redirect URL in the pr_redir variables, if the URL has characters such as question marks (?), ampersands (&), spaces, plusses (+), pound signs (#) or equal signs (=), please encode these according to the HTTP protocol as follows:
| Character |
Gets replaced with |
| ? |
%3F |
| & |
%26 |
| (space) |
%20 |
|
|
| Character |
Gets replaced with |
| + |
%2B |
| # |
%23 |
| = |
%3D |
|
Tracking Clicks from Within the <noscript> section
For some tagging types an additional <noscript> section is included in the ad tag. Click redirects are applied to this section in the traditional way of wrapping the default redirect in front of the HREF value.
For example:
Assume that the default publisher redirect is...
http://www.myserver.com/click/?final_destination_URL
And the HREF attribute of the anchor tag in the noscript section is...
href='http://ads.pointroll.com/DefaultAd/...'
Then the HREF should be changed to this:
href='http://www.myserver.com/click/?http://ads.pointroll.com/DefaultAd/...' |