Can we use both Google Analytics (Asynchronous) and Google Analytics with Display Advertising code in same page

Posted by Gadde on Pro Webmasters See other posts from Pro Webmasters or by Gadde
Published on 2013-12-04T07:13:37Z Indexed on 2014/06/04 3:39 UTC
Read the original article Hit count: 146

Filed under:

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.....

© Pro Webmasters or respective owner

Related posts about google-analytics