Forum Moderators: coopster
I want to track referrals coming from Google Adwords. thereore I have a small script installed that retrieved information about date/time, remote IP address, and referer (full referer with all search information).
Until now it was easy for me.
All my Adwords Ads have target URLs like mydomain.com/mypage.htm?G45
What I want to do is readout the part behind the questionmark.
How is this possible?
The script I have in place so far looks like this:
$timestamp=date("Y/m/j H:i:s");
$addr=getenv("REMOTE_ADDR");
$ref=getenv("HTTP_REFERER");
$myfile="/path/to/cgi-bin/testlog.txt";
$fd=fopen($myfile,"a");
$success=fwrite($fd, $timestamp."¦".$addr."¦".$ref ."\n");
fclose($fd);
Any help on this is very much appreciated.Thanks in avance.
To answer your question: this little script is called from the page that gets the click from google. So what I do is track which ad is how often clicked and which keywords are used. quite helpful when you don't get too many clicks.