SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Google Analytics - recording hits to multiple accounts?

    I hope this is the right forum to ask this question.

    I want to setup Analytics on a site - easy enough - but I want to record the site traffic to several different accounts simultaneously.

    So Account A will track pure page views and will be an accurate count of visitors, etc.; Account B will track page views but separated by site section (so I can track user paths by page type); and Account C will track JavaScript events and other interface interactions.

    For example, I hit a location page and open up the popup calendar widget:

    Account A records: /location/en/london/whitechapel/12345
    Account B records: /location/destination
    Account C records: /click/calendar, /click/select-date

    Does anyone know how to set up the script include to get this to work?

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Darn - I knew as soon as I posted this that I would find the answer:

    Code:
    <script type="text/javascript"> 
      var gaJsHost = (("https:" == document.location.protocol) ? 
      "https://ssl." : "http://www."); 
      document.write(unescape("&#37;3Cscript src='" + gaJsHost + 
      "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 
    </script> 
    <script type="text/javascript"> 
        var firstTracker = _gat._getTracker("UA-12345-1"); 
        firstTracker._initData(); 
        firstTracker._trackPageview(); 
        var secondTracker = _gat._getTracker("UA-67890-1"); 
        secondTracker._initData(); 
        secondTracker._trackPageview('/location/destination'); 
    </script>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •