Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Google Analytics Question? Two accounts tracking one website

  • 07-03-2013 07: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, Registered Users 2 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, Registered Users 2 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