James Bachini

Firing a S2S tracking url from an image conversion pixel

Use this on your landing page:
setcookie(“cid”, $_GET[‘accid’], time()+7*24*60*60, ‘/’, ‘.mydomain.com’);

This sets up a cookie so you can track a click id in www.mydomain.com?accid=123
You could also set this up track any other data you want, subid, affiliate id etc.

Then setup your conversion image pixel as <img src=”http://www.mydomain.com/conversion.php” height=”1px” width=”1px” />

This code goes in conversion.php
if (isset($_COOKIE[‘accid’])) {
$url = ‘http://www.trackingdomain.com/server2servertracking/conv.php?cid=’.$_COOKIE[‘accid’];
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($ch);
curl_close($ch);
}

A word of warning, don’t use cid as the get variable if you are using prosper202 as well because prosper sometimes writes over it with its own click id. That little bug drove me nuts.


Get The Blockchain Sector Newsletter, binge the YouTube channel and connect with me on Twitter

The Blockchain Sector newsletter goes out a few times a month when there is breaking news or interesting developments to discuss. All the content I produce is free, if you’d like to help please share this content on social media.

Thank you.

James Bachini

Disclaimer: Not a financial advisor, not financial advice. The content I create is to document my journey and for educational and entertainment purposes only. It is not under any circumstances investment advice. I am not an investment or trading professional and am learning myself while still making plenty of mistakes along the way. Any code published is experimental and not production ready to be used for financial transactions. Do your own research and do not play with funds you do not want to lose.


Posted

in

by