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.4K members online now
1.4K members online now
Use Google Ads conversion tracking and reporting to measure your results. Have a question about Google Analytics? Post it here, on the Google Analytics Community!
Guide Me
star_border
Reply

Conversion tracking: ins and outs of how it works

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I have been trying to configure Google AdWords conversion tracking. While I have configured the tracking, the tracking is not working. I was wondering if anyone could give an indication of how tracking works so that I can debug and fix why our conversions aren't working. The biggest "unknown" aspect of tracking is how the source (ad click) is carried through a conversion. Here's what I do know:

 

  1. A user clicks an ad that takes them to our site. Our site has Google Analytics installed (assuming this is a requirement). The URL is something like http://www.mycompany.site/?utm_source=google&utm_medium=cpc&utm_campaign=conversion+test
  2. Something happens by landing on our home page with those URL parameters - this is the unclear part for me.
  3. User clicks the "register" link, which goes to "/register" on our site. Nothing special happens here.
  4. User submits registration info, and lands on a "conversion page", which sends a trackback to Adwords.

I would assume that the URL from 1 results in Google Analytics setting a cookie based on the UTM parameters? But Analytics loads from a different domain to Adwords (googleadservices.com), so I don't see how the source / campaign is carried through (e.g. via a cookie, due to different domains).

 

Our post-registration conversion page is a page that is accessed not only by registrations. E.g. "/dashboard", and so we attach the conversion.js to the dom via javascript after a successful registration. But we never get the actual conversion request going through, and I'm wondering if there needs to be a googleadservices.com widget on the landing page of the ad, that reads the URL parameters and sets cookies or does something as per #2 above to enable tracking?

 

thanks in advance .

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by John Paul (Google Employee)
September 2015

Re: Conversion tracking: ins and outs of how it works

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
A quick note that we seemed to get the tracking working by using a bit of a workaround. Instead of injecting the script tags directly into the body of the HTML page, we dynamically attach an iframe to the DOM, with the contents of the iframe having the script tags implemented as per the instructions in GAW.

View solution in original post

Re: Conversion tracking: ins and outs of how it works

Google Employee
# 2
Google Employee

HI Brett,

 

Thanks for your question. I've escalated this to our Adwords Support team for follow-up. You should be contacted shortly for this issue.

 

In the meantime, it would help us if you could clarify some questions: Are you using automatic or manual tagging? And are you using the Google Adwords conversion tags? Or Google Analytics tags?

Re: Conversion tracking: ins and outs of how it works

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks JP. Support did get back to me. Apparently it's not working as we did not implement it as per the provided code-snippet.

As explained, we can't host the code snippet on a "conversion page" because there is no conversion page. The page that a user lands on after registering is the same page that a user (under certain conditions) will land on if logging on, e.g. a "/dashboard" page. The conversion is determined by logic in javascript. With this in mind, we had a look at what the conversion code does, and implemented the same calls in a different way.

Would be great to hear from the community if this approach should work:

Instead of putting the "script" conversion code on a landing page, we used the "noscript" image to inject the conversion tracking beacon into the page with javascript. The result of this is that instead of having javascript variables being set, such as google_conversion_id, and then calling the remote "conversion.js" script which parses the variables and then uses document.write to write an image tag, we just inject the image tag directly.

pseudo end result from both methods: GET www.googleadservices.com/some/path/img.png?with_some_values=set

when we tested this approach in production, by clearing all cache and cookies, searching for one of our adwords keywords, and then clicking our ad (i.e. entering our site with utm_ parameters set), we noticed that ct_cookie_present=true is set on the img. We also set up a dummy conversion page with the traditional "script" tags as per the implementation guide, and noticed that exactly the same resources were called.

However, in GAW dashboard, we are still not reflecting conversions (even for the dummy page we used, which did have the script installed as per the recommendation.

Any feedback or advice on how to get our GAW conversions tracked? adwords without conversion tracking doesn't have much value for us.


Marked as Best Answer.
Solution
Accepted by John Paul (Google Employee)
September 2015

Re: Conversion tracking: ins and outs of how it works

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
A quick note that we seemed to get the tracking working by using a bit of a workaround. Instead of injecting the script tags directly into the body of the HTML page, we dynamically attach an iframe to the DOM, with the contents of the iframe having the script tags implemented as per the instructions in GAW.

Re: Conversion tracking: ins and outs of how it works

Google Employee
# 5
Google Employee
Hi Brett,

Thanks for the update! I'll let our team and the community know this is the fix for this issue.

Re: Conversion tracking: ins and outs of how it works

Top Contributor
# 6
Top Contributor
Hi Brett,

Using an iFrame is an interesting technique. Serving up just the image part of the code should have worked for you too. Are you creating the iFrame with a src? That seems the best way to go about it.

I have no idea why this was escalated to AdWords support. Most on this forum are aware you can not serve the conversion script with a callback or with Ajax. It's not a bug, it's a design feature.

Best of Luck!

Pete
petebardo -- Deadhead doing AdWords

Re: Conversion tracking: ins and outs of how it works

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hi Pete,

Yup, we designed a static page that hosts the script as per the code recommendations (it's a blank page with html, head, title, body and the script tags). A conversion is classified in javascipt, and we use the following pseudo code to attach the iframe:

var conversionFrame=document.createElement("iframe")
conversionFrame.src="/analytics/conversionRegistration")
// use the above approach to set frameboard=0,scrolling=no, width=1, height, style, etc.
$("body").apppend(conversionFrame)

As you can see, this gives a jquery approach to dynamically injecting conversion code in a workable way.

With regards to the approach of attaching the image tag to the DOM - My thoughts on that approach was that it would work too, and the resulting requests to google services exactly match the iframe approach. I am clueless as to why the iframe-base conversions show in reports, but direct image injection doesn't. (even the same cookies / headers are set on the requests).