3

I have Google Analytics (Asynchronous) script

    <script type=”text/javascript”>    
    _gaq.push(['_setAccount', 'UA-XXXXX-X']);
    _gaq.push(['_trackPageview']);    
    (function() {    
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;    
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';    
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);    
})();    
</script>

and Google Analytics with Display Advertising Script

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXX-X-yz']);
_gaq.push(['_trackPageview']);    
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

The UA - codes are different can i use both the codes ?

I've read some where that Universal Analytics will not interfere with previous versions of Google Analytics.

If i have upgraded to Universal Analytics, If the UA - codes are different should i use only the Universal Analytics script or should i use both Universal Analytics script and Universal Analytics script.

please advise.....

1

There is no need to have two GA codes to enable display advertising features. Use one Universal Analytics tracking tag with the display features enabled.

Under the Analytics Admin pane, go to Property Settings. Under Advertising Features, make sure this is set to on. Your tracking code will be updated to reflect this change.

| improve this answer | |
0

Here is a question on StackOverflow in which the poster discovers that a universal analytics snippet and an old style analytics snippet clash.

That person was able to solve their problem with a multiple tracker method:

ga('create', 'UA-00000000-0', {'name': 'myTracker'});

Even if those two didn't conflict now, they might start conflicting when Google migrates all accounts to universal analytics.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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