With affiliate marketing and PHP, I know how to make a tracking pixel like this:
<img alt="" src="http://example.com/pixel.php?tracking=43233" />
Then, in pixel.php I do something like:
<?php
$sTrack = @ $_GET['tracking'];
$sTrack = urldecode($sTrack);
$sTrack = strip_tags($sTrack);
$sTrack = trim($sTrack);
// do something with sTrack here
header('Content-type: image/gif');
readfile('images/invisible.gif');
Trouble is, on this offer page I'm receiving cname and cemail as query params on the URL, and the customer is hosting on something that doesn't support PHP but does let me insert Javascript, and I CAN'T use jQuery in this case. Instead, I need to do this in 100% pure Javascript. So, I can't read $_GET to pick up the cname and cemail.
I know that location.search will give me those parameters. I just need how to change the IMG tag so that like on a load event I can pass the location.search on the end. And I need it to work across all the browsers since IE7 and up, as well as Opera, Safari, and Chrome.
You can just use the http://example.com/pixel.php as the img src, and then check the referral in that PHP script.