Home > Technical & Creative Skills > Tracking Campaigns

Tracking without a Tracker: Coders..please advise... (6)


07-01-2014 06:11 AM #1 onlinetrafficpartners (Member)
Tracking without a Tracker: Coders..please advise...

I want to run tracking without the use of third party tracker.

Can that be done without using a tracking software?

Is it possible to do this with query string?

If someone has a PHP Script to do this, please share.


07-01-2014 06:53 AM #2 zeno (Administrator)

You mean *without the use of a third party tracker?

My first question is: Why?

Do you have some situation where a preexisting tracking system, which is well-developed and better than anything you can do by hand, is not appropriate?


Yes, it is possible to track and log data just using PHP code on all your pages that pulls query strings, saves data to CSV, passes query string data onward in click URLs, etc.

However there is no pre-made PHP script to do this - most people would write code ad hoc for whatever they need to be done.

Much like how you would write some instructions down for a maid cleaning your house rather than giving them some standardised list you downloaded off the internet.

In any case, if you want some additional input, you'll have to outline specifically what you're trying to achieve.


07-01-2014 07:21 AM #3 onlinetrafficpartners (Member)

i want to do testing because i was losing clicks with the tracking software

so i will try to pass query string and see if that has any difference in conversion

maybe a little overkill....


07-01-2014 09:09 AM #4 zeno (Administrator)

Ahhh.

For this I would just put PHP at the top of your lander that logs data to a CSV file, or do the same in a script that redirects for direct linking.

I can't give something appropriate off the top of my head but you should be able to hire someone on Fiverr or oDesk who will be able to write code that dumps everything to a CSV file with header columns like c1, c2, c3, etc.

In my coding repository I have this if it helps:

Code:
<?php
   $s1 = $_GET['s1']; //Ad nick
   $s2 = $_GET['s2']; //Target
   $geo = geoip_record_by_name( $_SERVER['REMOTE_ADDR'] );
   $country_code = $geo['country_code'];
   
//Log to CSV
$fp = fopen ( date("Y-m-d").'.csv', 'a' );
fputcsv ( $fp, array ( $s1, $s2, $country_code, 'OUTGOING LOCATION e.g. F5 MEDIA' ), ",", '"' );
fclose ( $fp ); 
header('Location: http://domain.com/?a=12345&c=6789&s1='.$s1.'&s2='.$s2.'&s3='.$country_code); //or could put an 'include' lander file line here.
exit;
?>


07-01-2014 11:44 AM #5 onlinetrafficpartners (Member)

Perfect! This is what I was looking for. Thanks


07-01-2014 03:11 PM #6 bbrock32 (Administrator)

If you have a decent server the difference won't be big ( I have split tested in the past ).

However if you want to skip it just pass into the subids the info you need manually ( ad name, clickid etc)


Home > Technical & Creative Skills > Tracking Campaigns