AdWords
3.1K members online now
3.1K 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
star_border
Reply

view through conversion tracking code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi Adwords community

 

I am trying to start using view through conversion tracking but I am wondering about the code I need to implement.

 

Currently my code is:

 

 

                        var _gaq = _gaq || [];

 

                        _gaq.push(['_setAccount', 'UA-XXXXXX-X']);

                        _gaq.push(['_trackPageview']);

 

                        (function() {

                                   var ga = document.createElement('script');

 

                                   ga.src=('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';

 

                                   ga.setAttribute('async', 'true');

 

                                   try {

                                               document.getElementsByTagName("head")[0].appendChild(ga);

                                   } catch (error) {

                                              

                                   }

                        })();

           

 

New code:

 

 

                   var _gaq = _gaq || [];

 

                        _gaq.push(['_setAccount', 'UA-XXXXX-X']);

                        _gaq.push(['_trackPageview']);

 

                        (function() {

                                   var ga = document.createElement('script');

 

                                   ga.src=('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';

 

                                   ga.setAttribute('async', 'true');

 

                                   try {

                                               document.getElementsByTagName("head")[0].appendChild(ga);

                                   } catch (error) {

                                              

                                   }

                   })();

        

Is this correct? Is there something missing from the code?

 

 

 

1 Expert replyverified_user

Re: view through conversion tracking code

Top Contributor
# 2
Top Contributor

Hi Luka,

 

Your code is correct, however it's the outdated Standard Google Analytics code. I'd suggest upgrading your code to Universal Analytics and enable display advertising in it. Please check the document below:

 

https://support.google.com/analytics/answer/2444872

 

Hope this helps.


Arnold Majlath, Google Analytics Top Contributor
Circle Me On Google+ | Visit me @ Redfly Digital

Re: view through conversion tracking code

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thank you Arnold,

Yes I will definitely be going Universal in the following month but I need to put this up ASAP.

So my tracking will not be affected differently with the new code?

Re: view through conversion tracking code

Top Contributor
# 4
Top Contributor

Hi Luka,

 

Switching to dc.js should not affect your tracking. When you make the changes you can check if your tag is installed correctly using the Google Tag Assistant Chrome extension. Also check the real time reports to see if the hits are being reported.


Arnold Majlath, Google Analytics Top Contributor
Circle Me On Google+ | Visit me @ Redfly Digital