Forum Moderators: open

Message Too Old, No Replies

javascript cookie for Google Adwords

"promotion code" help

         

clickwit

5:48 am on Feb 15, 2006 (gmt 0)

10+ Year Member



I'm sure many folks have already done this, so I'm hoping you can help me.

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?

DrDoc

5:51 am on Feb 15, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If anything, I would recommend a non-JavaScript solution. What you should do is check the referrer and match it against a list of sites from which people can click on links to your site.

Perhaps PHP/Perl might be a more suitable solution.

clickwit

4:41 am on Feb 16, 2006 (gmt 0)

10+ Year Member



Unfortunately, I don't have the technical expertise, nor access to expertise, for a PHP solution. Any low tech / javascript ideas?

sprinkles

11:35 pm on Feb 17, 2006 (gmt 0)

10+ Year Member



In php you could use something simple like this, then change the urls that the ads link to:
[hotel.com...]
[hotel.com...]
etc.

<?
$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.