Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to detect if my visitors are coming to my website via a Google Adwords Ad?

It would like to change the telephone number for those users only, that way I can measure the success of my adwords campaign with the number of calls.

share|improve this question

migrated from stackoverflow.com Sep 30 '11 at 14:49

This question came from our site for professional and enthusiast programmers.

You can do that on the server side by looking at HTTP_REFERER, or better yet, make the link in the Adwords ad have a parameter that you catch on the server. – Jonathan M Sep 29 '11 at 18:33
up vote 5 down vote accepted

You can use the special utm_ query string parameters mentioned here: http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=156114

Then switch your phone number out based on (for example) utm_campaign

If you use the auto tagging feature (on by default) the parameter to look for is gclid: http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=55596

share|improve this answer
After clicking on an AdWords ad and arriving at a ?glcid=... link, I presume after the user clicks on another link, that gclid parameter disappears. Is there a way to know if the traffic originated from AdWords even after navigating to a second page? – Flimm Sep 4 '15 at 16:30

On the server you need to grab the value of "HTTP_REFERER"

Also, Google Analytics should be able to do this for you, out of the box.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.