[Google Analytics +] Google Analytics pageviews not being attributed to mapped domains

Not sure how it took me so long to realize this, but when using the Google Analytics + plugin any pageview on a subsite with a mapped domain is not being attributed to that subsite, but instead being attributed to the root site.

When checking the subsites statistics via the wordpress dashboard /wp-admin/index.php?page=google-analytics-statistics&date_range=12 for example, no publically viewable pages are shown in the stats.

When viewing page views directly via the GA website, the pageviews on mapped domains show as being sub pages of the root domain, rather than a subsite.

This appears to be a problem whether I am using the retired wpmudev domain mapping plugin or "WordPress MU Domain Mapping" from the wordpress repository.

How can I ensure that pageviews are properly attributed to mapped domains and show up on those sites dashboard statistics?

My setup:
wordpress multisite
dashboard pages as original domain (unmapped)

  • Predrag Dubajic
    • Support

    Hi Dan,

    This is default behavior of Google Analytics and in order to track your subsites separately you will need to create separate properties for each subsite and use separate tracking code in each one.

    We are working on a big update for GA+ that will include more information about this, but in the meantime, you can also check this guide:
    http://www.ericmobley.net/guide-to-tracking-multiple-subdomains-in-google-analytics/

    Best regards,
    Predrag

    • Dan Berdal
      • Design Lord, Child of Thor

      Hi Predrag,

      Thanks for the help. I found that guide yesterday and made the recommended changes in GA to display the domain as part of the URI.

      When I visit the GA website things appear correctly, and I see my various mapped domains showing up, but when I view the "statistics" page on my site, my traffic appears to be WAY down for yesterday.

      I know there is a delay in stats, and may be too early to tell if it's working correctly.

      In your experience, does GA+ still correctly attribute visits to mapped and unmapped sites when using the filtered view recommended in that tutorial?

      I'll post back with results either way

  • Dan Berdal
    • Design Lord, Child of Thor

    I looked through the domain mapping plugin code and it looks as though it's attempting to fix this issue, but apparently it's not working.

    when a site has a mapped domain we want GA host = mapped domain

    when a site doesn't have a mapped domain we ignore the host and want to match blog url as a pre-fix to all pageviews.

    Anyway, you said there was an update on the way. Is it expected to fix this issue? Is the update available yet for testing?

  • Predrag Dubajic
    • Support

    Hi Dan,

    Is that issue only happening with Domain Mapping or it's the same when you use native WP mapping?

    Anyway, you said there was an update on the way. Is it expected to fix this issue? Is the update available yet for testing?

    There will improvements for multisite, but I don't believe there will be specific changes for Domain Mapping plugin.
    There's no update available for testing yet since this is pretty much a full overhaul of the plugin so we don't have an ETA yet.
    We might see it in the Test Center once it's closer to release.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.