mergegoogle-analyticsaccounts

Two google analytics accounts


Here is the problem. I added a new analytics code to a page without knowing it already had one.

So now, there are two tracking code in one website, but the report data is different between.

Stupid me .. Now I even do not know which one is correct.

Ideally I want to use all the correct data from both and merge them into one. Probably that is not possible..

Anyone know what should I do?

Thanks for help!

Here is the code.


    

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'MYSITE_ID_1']);
      _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);
      })();

    


    

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'MYSITE_ID_2']);
      _gaq.push(['_setDomainName', 'mysite.com']);
      _gaq.push(['_setAllowLinker', true]);
      _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);
      })();

    


Solution

  • You cant merge data from one account into another. You are probably best off by deciding what account has the best data and then deleting the code for the other from your site. You dont need to close the other account so the data will not be lost. It will just be a pain to pull the data from 2 sources if you need to look into the older data on the other account.