Pheedo

The following presents a guideline on how Pheedo standard and rich media tags should be edited to count clicks in Google Ad Manager. In order to track clicks follow the procedure below:

JavaScript Code

Original Code

You should have received some JavaScript code from Pheedo that looks similar to the following example:

<script type=’text/javascript’>
var ph_redir=”;
var ph_bust=Math.random();
var ph_src=’https://www.pheedo.com/ad.php?i=1&zone=7tIJTXc7GrphSvlxsXr5E7Ky4cr4kAwkq4’;
ph_src+=’&BorderColor=%23006699&BorderWidth=1&BgColor=%23ffffff&TextColor=%23000000′;
ph_src+=’&TextFace=Arial%2C%20Verdana%2C%20sans-serif&TextSize=11&LinkColor=%23006699&UrlColor=%23999999&cb=[timestamp]’;
document.write(‘<ifr’+’ame ‘);
document.write(‘src=”‘ + ph_src.replace(‘[timestamp]’, ph_bust));
document.write(‘&redir=’ + ph_redir + ‘” ‘);
document.write(‘height=”250″ width=”300″ frameborder=”0″ ‘);
document.write(‘marginwidth=”0″ marginheight=”0″ vspace=”0″ hspace=”0″ scrolling=”no” ‘);
document.write(‘allowtransparency=”true” style=”overflow: hidden; margin: 0; padding: 0;”>’);
document.write(‘</ifr’+’ame>’);
</script>
<noscript>
<iframe src=https://www.pheedo.com/ad.php?i=1&zone=7tIJTXc7GrphSvlxsXr5E7Ky4cr4kAwkq4&BorderColor=%23006699&BorderWidth=1&BgColor=%23ffffff&TextColor=%23000000&TextFace=Arial%2C%20Verdana%2C%20sans-serif&TextSize=11&LinkColor=%23006699&UrlColor=%23999999&cb=[timestamp]&redir=” width=”300″ height=”250″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ vspace=”0″ hspace=”0″
scrolling=”no” allowtransparency=”true” style=”overflow: hidden; margin: 0; padding: 0;”>
</iframe>
</noscript>

Modified Code

What you need to do is modify the URL in the <SCRIPT> tag as shown by the highlighted changes, The resulting tag should look similar to the following example:

<script type=’text/javascript’>
var ph_redir='%%CLICK_URL_ESC%%';
var ph_bust=Math.random(%%CACHEBUSTER%%);
var ph_src=’https://www.pheedo.com/ad.php?i=1&zone=7tIJTXc7GrphSvlxsXr5E7Ky4cr4kAwkq4’;
ph_src+=’&BorderColor=%23006699&BorderWidth=1&BgColor=%23ffffff&TextColor=%23000000′;
ph_src+=’&TextFace=Arial%2C%20Verdana%2C%20sans-serif&TextSize=11&LinkColor=%23006699&UrlColor=%23999999&cb=%%CACHEBUSTER%%’;
document.write(‘<ifr’+’ame ‘);
document.write(‘src=”‘ + ph_src.replace(‘%%CACHEBUSTER%%’, ph_bust));
document.write(‘&redir=’ + ph_redir + ‘” ‘);
document.write(‘height=”250″ width=”300″ frameborder=”0″ ‘);
document.write(‘marginwidth=”0″ marginheight=”0″ vspace=”0″ hspace=”0″ scrolling=”no” ‘);
document.write(‘allowtransparency=”true” style=”overflow: hidden; margin: 0; padding: 0;”>’);
document.write(‘</ifr’+’ame>’);
</script>
<noscript>
<iframe src=https://www.pheedo.com/ad.php?i=1&zone=7tIJTXc7GrphSvlxsXr5E7Ky4cr4kAwkq4&BorderColor=%23006699&BorderWidth=1&BgColor=%23ffffff&TextColor=%23000000&TextFace=Arial%2C%20Verdana%2C%20sans-serif&TextSize=11&LinkColor=%23006699&UrlColor=%23999999&cb=%%CACHEBUSTER%%&redir=%%CLICK_URL_ESC%%” width=”300″ height=”250″ frameborder=”0″ marginwidth=”0″ marginheight=”0″ vspace=”0″ hspace=”0″
scrolling=”no” allowtransparency=”true” style=”overflow: hidden; margin: 0; padding: 0;”>
</iframe>
</noscript>

Note

The ad server recognises the [timestamp] placeholder and will automatically replace it with a cache buster. It is not necessary to convert it to the %%CACHEBUSTER%% macro manually.

Use %%CLICK_URL_UNESC%% at the beginning of a link. Use %%CLICK_URL_ESC%% when the click-tracker is the parameter of another URL.

<a href="%%CLICK_URL_UNESC%%https://www.google.com">link</a>
<a href="https://www.google.com?rd_url=%%CLICK_URL_ESC%%">link</a>