Multisite Google Analytics Plugin - Not seeing domains in reports

Multisite Google Analytics WPMUDEV plugin: In my GA reports I only see the page name path and not the domain name. I’m using WPMU 3.5.1 with subdomain install and domain mapping. How can I see which domains are getting the traffic?

  • aecnu
    • WP Unicorn

    Greetings robbie_reynolds,

    Thank you for the great question in which I admit that I do not know the answer relative to the other sites.

    Therefore I will see if I can get the lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Hakan
    • The Incredible Smush

    Hi,

    Multisite Analytics just sends all required data to your Google Analytics account. It is up to your GA settings how to create reports from them.

    I personally use "Profiles" setting of GA. Use Admin>Profiles and enter your subdomains there. GA will separate data depending on the subdomain url. However there may be other methods to have reports.

    Cheers,
    Hakan

  • robbie_reynolds
    • Flash Drive

    @hakan - My apologies for my ignorance. Either I'm missing something from your explanation or I'm not making clear what I'm trying to accomplish.

    One Google Analytics account
    One WP Multisite - http://www.mywpmunetworksite.com
    Hundreds of top level domains - http://www.client1wpmunetworksite.com

    What I see now in GA for content viewed:
    /pagename/
    /pagename/
    /pagename/

    What I'd like to see:
    http://www.mywpmunetworksite.com/networkpagename/
    http://www.client1wpmunetworksite.com/pagename/
    http://www.client2wpmunetworksite.com/pagename/
    http://www.client3wpmunetworksite.com/pagename/

    I know it may seem redundant to you, but would you outline specifically how to accomplish this?

    It seems as if I were to create GA profiles for each domain, then I could only view reports for that domain while viewing that profile and not one master profile to view reports for all domains together.

  • Hakan
    • The Incredible Smush

    Robbie, we are not Google. You are asking help about GA which I think I have already explained in brief, but detailed information can only be found from GA itself.

    Developing a plugin for GA does not make us required to give support for how to use GA.

    Please read help files of GA.

    Once more, add "Profiles" to your account. Just check "profiles" keyword there.

    If there are some members who have time and share their settings, they are welcome to write.

  • robbie_reynolds
    • Flash Drive

    @hakan - I understand you're not Google and are not required to provide support for specifics, but if you have knowledge that is related to your plugin and would benefit members, I don't see the harm in sharing it.

    Anyways, I managed to get the proper settings in GA, however the tracking code on each domain is not registering/displaying the domain name in the GA tracking code. I have turned on Domain mapping. Here is the code being displayed...

    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-********-1']);
    _gaq.push(['_setDomainName', 'none']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setAllowHash', false]);
    _gaq.push(['_trackPageview']);
    _gaq.push(['_trackPageLoadTime']);

    (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>

  • Fullworks
    • The Bug Hunter

    why did you do this
    _gaq.push(['_setDomainName', 'none']);

    as obviously then you won't be send a domain name to the GA.?

    I am not 100% familiar with the best setup for GA on a multi-site, but in the world on normal websites if you want to report multiple domains in one profile
    then this should be set to the domain name that you are collecting stats from.

    Personally I use Piwik on my multi sites. Piwik & the Piwik plugin work well with multi-sites and gives me all the traffic stats I need. Downside is of course you need to install Piwik somewhere, but frankly installing Piwik is as simple as installing Wordpress.

  • robbie_reynolds
    • Flash Drive

    @roibot - I am using the WPMUDEV GA plugin. It is the thing responsible for setting the domain name in the _gaq.push(['_setDomainName', 'none']);

    That's what I am concerned with. I have GA configured correctly now, but the plugin is not inserting the domain name into the tracking code per domain.

  • Fullworks
    • The Bug Hunter

    OK I see your problem. As I mentioned, I haven't looked deeply into how this plugin should be used, so I don't think my interaction has been that useful.

    Have you actually tried applying the domain name filter anyway, as the WPMU guys say it passes everything. As by default you only see page & path in GA. See screenshot to see the correct Advance filter setup.

    I think I would do that first and see if indeed the correct data is being passed.

    By the way, it is a good advice to set up 3 profiles for your GA account
    1. raw data - don't apply any filters to this ever
    2. sandbox - to test out any filters you want to apply (like this)
    3. production - the live 'filtered' profile

    This is because, once you apply an incorrectly setup filter you can't get the databack, hence the 'back up' of the raw, etc.

  • aecnu
    • WP Unicorn

    Greetings robbie_reynolds,

    Sorry to see that you have not managed to resolve this issue yet and I will indeed see if Hakan has any other ideas that may resolve this issue and understand that you said:

    It is the plugin that is not inserting the domain name into the tracking code on the websites, so GA isn't pulling in the data.

    Though this may take a bit longer then a normal ticket, I will try to get him back in here asap.

    Cheers, Joe

  • Hakan
    • The Incredible Smush

    Hi,

    _gaq.push(['_setDomainName', 'none']);

    In domain mapping (multiple domain tracking), this code is recommended by Google itself to track traffic accross domains also. Please see this:
    https://developers.google.com/analytics/devguides/collection/gajs/asyncMigrationExamples#CrossDomainLinking

    Also read this and check if you set up your profiles like that:
    https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#keyComponents

    Cheers,
    Hakan

  • Hakan
    • The Incredible Smush

    Are you wanting me to modify the code generated by the plugin?

    No, that code is already there.

    Original poster asked why it is there.

    why did you do this
    _gaq.push(['_setDomainName', 'none']);

    I just explained the reason.

    So you don't need to do anything except entering your GA ID and selecting if you are using Domain Mapping or not.

    Cheers,
    Hakan

  • aecnu
    • WP Unicorn

    Greetings Everyone,

    After the last post of the lead developer, it appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn't resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Thank you all for being WPMU Dev Community Members!

    Cheers, Joe

  • Jennifer
    • The Incredible Code Injector

    I updated the other post, but wanted to update here as well.

    Here are the specific Google instructions for how to get this working:
    https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite

    Specifically look at this section "Key Components to Cross-Domain Tracking"

    All I did was follow those instructions and now I have a profile that shows all of the content by sub-domain. If I want to see traffic for a specific subdomain I just run a quick search query on the results.

    This is not a perfect solution as it would be nice to see a list of sub-domains that I could click to get traffic - but this definitely gets the job done...

  • werm42
    • New Recruit

    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-********-1']);
    _gaq.push(['_setDomainName', 'none']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setAllowHash', false]);
    _gaq.push(['_trackPageview']);
    _gaq.push(['_trackPageLoadTime']);

    (function() {
    var ga = document.createElement('script':wink:; ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www':wink: + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script':wink:[0]; s.parentNode.insertBefore(ga, s);
    })();
    </script>

    I'm getting none of these elements in my tracking code:

    _gaq.push(['_setDomainName', 'none']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_setAllowHash', false]);
    _gaq.push(['_trackPageview']);
    _gaq.push(['_trackPageLoadTime']);

    See screenshot of my NetworkAdmin Setting.

    I have "track subdomain" turned to NO because I'm using Subdirectories, and I'm using domain mapping.

    Please advise.

  • werm42
    • New Recruit

    Update: This looks like a matter of semantics for "subdomain tracking" when in reality getting this working properly, and using the plugin for the purpose it was built for this "election" is more of a requirement.

    I.E.: You can't get your entire network tracked without saying "Yes" to SubDomain Tracking

    Subdomain Tracking should probably be changed to read: "Network Tracking" as "Yes" is required to track sites in your network.

  • aecnu
    • WP Unicorn

    Greetings,

    It appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn't resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Thank you for being a WPMU Dev Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.