GA Filter to view multiple sites in one account or a single site on it's own

Discussion in 'Google Analytics' started by gbrent, Nov 7, 2012.

  1. #1
    I want to have one account with many sites under it. I want to be able to say I had 40,000 visits today from 10 sites. Site1.com had 30,000 visits, site2.com had 5,000 visits, site3.com had 150 visits. etc etc etc

    I believe have to have filters to do this however my setup is not working. Currently each site is reporting visits for all sites combined.

    Filters setup as so:
    Customer Filter > Advanced:
    Field A -> Extract A: Hostname (.*)site1\.com
    Field B -> Extract B: Request URI (.*)site1\.com
    Output To -> Constructor: Request URI $A1$B1

    The analytics code I am using looks like this (with site1.com changed to the name of the each site)
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-7917566-9']);
      _gaq.push(['_setDomainName', 'site1.com']);
      _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>
    Code (markup):
    Any help is much appreciated as I don't know what else I can do to get this running.
     
    gbrent, Nov 7, 2012 IP