Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Google Analytics Question? Two accounts tracking one website

Options
  • 07-03-2013 8:09pm
    #1
    Closed Accounts Posts: 7,863 ✭✭✭


    Hi all,

    Is it possible to track one website using two accounts, as opposed to two profiles.

    For example. Website www.abc.com has analytics installed.

    With a separate account, is it possible to install part of the GA snippet and track the one website with 2 analytics accounts? So, it would look something like this:

    <script type=“text/javascript”>
    var _gaq = _gaq || [];
    _gaq.push(
    [‘_setAccount’, ‘UA-XXXXA-X’],
    [‘_trackPageview’],
    [‘b._setAccount’, ‘UA-XXXXB-X’],
    [‘b._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>


Comments

  • Registered Users Posts: 7 YankIE


    The official policy from google (not supported):

    http://support.google.com/analytics/bin/answer.py?hl=en&answer=1032400

    I have several sites where I ran two separate GA scripts on the same page (associated with separate GA accounts), and could not detect any issues.

    Never tried mixing multiple profiles in the same script, however...


  • Closed Accounts Posts: 7,863 ✭✭✭seachto7


    I tried it, and it seems to work. Tracking the same site, but with 2 different profiles temporarily


  • Registered Users Posts: 7 YankIE


    seachto7 wrote: »
    I tried it, and it seems to work. Tracking the same site, but with 2 different profiles temporarily

    I was looking at the source of cnet.com for an entirely different purpose- and noticed they had two profiles within the same GA script. Must be fine- I figure they must know what they are doing. :)

    You can see for yourself at their home page.


Advertisement