Tracking DMR

xhpdx

Regular Member
Joined
Sep 21, 2008
Messages
326
Reaction score
2,172
I am building a custom tracker for myself and have trouble properly tracking dmrs. Basically instead of counting 1 click it is counted twice(duh it is dmr), so I decided to check if there is a query string in the second meta refresh and if there isn't then count it as a click. To make it easier here is a sample code

PHP:
if($_SERVER['HTTP_REFERER'] != "") {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=$self?go=1\" />";}
    if($_SERVER['HTTP_REFERER'] == "") {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=$location\" />";}}

and this is my tracking
PHP:
if(!isset($_GET['go'])){
// track click
}

With a sniffer I see that the browser opens $self?go, but it is still tracked. Has anyone done something similar or have a better idea ?
 
or you can use extra variable


PHP:
$is_clean = false;
if($_SERVER['HTTP_REFERER'] != "") {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=$self\" />";}
    if($_SERVER['HTTP_REFERER'] == "") {
    $is_clean = true;
    echo "<meta http-equiv=\"refresh\" content=\"0;url=$location\" />";}}

PHP:
if($is_clean){
// track click
}

i like to track using pixel tracking. eg. piwik.org, prosper202;
or simple file/db click log.
 
That does not seem to work for me. I will probably have to simplify the app to do the tracking properly
 
Back
Top