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, ‘/’, ‘’);

This sets up a cookie so you can track a click id in
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=”” height=”1px” width=”1px” />

This code goes in conversion.php
if (isset($_COOKIE[‘accid’])) {
$url = ‘’.$_COOKIE[‘accid’];
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($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.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *