Forum Moderators: open
I advertise our small hotel on Google Adwords. Because I don't have online booking, I need a way to determine how many of our calls are due to users finding us via Adwords. What I'd like: a user clicks the Adwords ad and lands on our hotel special deal page. The page would display a code (ex: GOOG0206) generated by a script that the user would need to give us on the phone to get the special discount. Users who come to the same landing page from other places (Google organic, Yahoo, paid links, etc) would see a different promotion code. With this scheme, we'd know where the caller learned about us by the discount code they give us.
The script would obviously need to differeniate between organic and paid results from Google. I don't have javascript expertise, but I have a friend who has a little. Any canned scripts out there? Or straightforward ways to do this?
<?
$ref = $_GET['ref'];
if($ref=="googleo"){
$promo = "GOOG206";
} else if($ref="yahoo") {
$promo = "YAHOO206";
}
?>
Then when you want to display the promotion code, use:
<? echo $promo;?>
If you can't work out how to expand that, stickymail me and I'll try and help.