AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Ads
1.9K members online now
1.9K members online now
Get started with Google Ads - learn the basics to get set up for success
Guide Me
star_border
Reply

Detect AdWords visitors by using HTML, JavaScript

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello guys

 

For tracking purposes I want to serve 2 different PDFs the first one to all visitors coming from Google AdWords and the 2nd one to the rest of the visitors. By using HTML and JavaScript I don't know how to detect if a user comes from AdWords. Didn't either find any relevant material in the web, therefore is anyone knowledgeable on how to to this?

 

Many thanks!!

2 Expert replyverified_user

Re: Detect AdWords visitors by using HTML, JavaScript

Participant ✭ ✭ ☆
# 2
Participant ✭ ✭ ☆

Hello Kostas K, 

 

Welcome to adwords community, 

You have to to link with your adwords and analytics account. Where you can track your visitor from Google Adwords. 

For more information how to track your adwords and analytic Go with this link, 

https://support.google.com/analytics/answer/1033961?hl=en

 

Hope it helps you. 

Re: Detect AdWords visitors by using HTML, JavaScript

Explorer ✭ ✭ ☆
# 3
Explorer ✭ ✭ ☆

Hi Kostas,

 

I am not sure why would you like to use HTML and JS to create the pdfs. Also are you thinking of saving the visitors data in database and then generate a hourly/daily/monthly report?

 

As sumanppc said, you can accomplish this by linking analytics and adwords accounts linked and get the adwords data and rest of the data in pdf scheduled.

 

To do so yo ucan follow steps below-

1. If you dont have analytics and adwords accounts linked then, follow instructions here to link those

2. Manually tag the adwords destination urls to track the adwords detailed data.

3. Then
Traffic Sources > Sources > all traffic. Filter the data you want here and
Click on "Email" tab above the report and have it scheduled.

 

If you only want to use the javascript then you can read the http referer values in JS using
string = document.URL

and pull the data from the querystring.

 

It will help you if you have destination urls in adwords tagged like
http://www.example.com/?utm_campaign=spring&utm_medium=referral&utm_source=cpc

 

Then you can filter data from cpc as adwords and rest from different source and then save or process the data the way you want.

But again, is JS absolutely necessary.

 

Hope this helps!

SJ

Re: Detect AdWords visitors by using HTML, JavaScript

Top Contributor
# 4
Top Contributor

Hello and welcome,

 


@Kostas K wrote:

Hello guys

 

For tracking purposes I want to serve 2 different PDFs the first one to all visitors coming from Google AdWords and the 2nd one to the rest of the visitors. By using HTML and JavaScript I don't know how to detect if a user comes from AdWords. Didn't either find any relevant material in the web, therefore is anyone knowledgeable on how to to this?

 

Many thanks!!


Before I say anything I would like to cross check here that whether you are asking to take the users directly who are coming from Adwords to a PDF link. That means when the user click on your ad, you take user directly to a PDF link by giving PDF link in your destination URL.. If this is something you want, then I am afraid that is not allowed at all as per the Destination URL Policy. 

 

See the details here: https://support.google.com/adwordspolicy/answer/1310892?hl=en#

If your motive is first to take the user to a particular landing page, where you have some option or (button sort of) for the users to download some PDF, then it's a different case. I would suggest you to clarify this. 

 

Pankaj

Re: Detect AdWords visitors by using HTML, JavaScript

Top Contributor
# 5
Top Contributor

Hi Kostas,

 

I am going to take issue with SJAdWiser on this. Using the referrer data is the least reliable method of identifying AdWords clicks. The most reliable method is to use auto-tagging, then look for the presence of a gclid value in the query string.

 

The referrer data can be inconsistent. You will get false positives, and false false as well. Not all AdWords clicks will have a google.com referrer. All AdWords clicks will have a gclid value in the query string if you have auto-tagging enabled.

 

You could do this with manual tagging, as well, but you'll need to remember to add the manual tag for each and every destination URL in your account. That introduces opportunities for errors.

 

Best of Luck!

 

Pete

 

 

petebardo -- Deadhead doing AdWords

Re: Detect AdWords visitors by using HTML, JavaScript

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Thank you all guys for your advice.

 

Substantially, I am doing the AdWords campaign for a performing arts academy which has as a campaign goal to download  an application form and send it then over with a deposit. So far so good as I can track the downloads. However, I need to know how many of those applications that coming from AdWords activity have actually been sent to the academy together with the deposit. So I want to serve 2 different PDF forms. One which will be appropriately marked to be downloaded from AdWords visitors so then I will know that this form is coming from paid advertising and the other one, will be a normal form format for the rest of the visitors. 

 

All the Best!