4.9K members online now
4.9K members online now
Use AdWords conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me

using gclid variable to identify adwords source

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi there everyone,


Hope everyone is well!!!


So recently I wanted to capture the source of the customers on my website against their order record in my db.
(I know analytics shows me this info with goals, but need it to be more specific).

Anyhoo - I'm currently using a php statement to test if gclid is not null as part of the incoming url and if it is then, then that identifies the customer as coming from Adwords.


I just wanted to check that with someone in the forums too that might have perhaps a better way of doing it or to see if that's going to work / not work at all?


Thanks for any help ppl!!!


Cat Tongue

1 Expert replyverified_user
Marked as Best Answer.
Accepted by Zee (Community Manager)
September 2015

Re: using gclid variable to identify adwords source

Top Contributor
# 2
Top Contributor

Hi loginid,


Testing for the presence of the gclid value is the most reliable method of identifying AdWords visitors. But I'm not sure testing for a null value is going to work. Perhaps that's not what you meant. Use the array_key_exists() function against the $REQUEST array will definitely work.


I do the same thing, but on the client side with Javascript as my landing pages are html, not dynamic.


Best of Luck!




petebardo -- Deadhead doing AdWords

Re: using gclid variable to identify adwords source

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Thanks Pete!


Man Very Happy