Title: Google Analytics Multiple Domains
Last modified: August 21, 2016

---

# Google Analytics Multiple Domains

 *  Resolved [Hopeless2](https://wordpress.org/support/users/hopeless2/)
 * (@hopeless2)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/)
 * I am trying to make subdomain tracking working for some hours already – and it
   still does not work, that is very depressing.
 * I just do not know what the problem is. At first I tried to make 3 different 
   views in google analytics: one for the main domain and one for each of the both
   subdomains. I made filters for showing the whole path and for just showing the
   content of subdomain a on view a, and for subdomain b on view b.
 * In this case I can track all 3 websites on the view for the main domain, just
   as I want to. But I do not get any track for the subdomain views, it just does
   not show anything.
 * Then I have tried it with three properties, same logic as above, one for each
   domain/ subdomain. But then only the main domain will be tracked, and none of
   the subdomains will ever be tracked. Thus I will just see visits on my main domain,
   but I will not be able to see any visit on any of my subdomains (even for the
   main domain view).
 * I hope somebody can help me with this issue. I am really clueless and do not 
   know what else I could try.
 * [https://wordpress.org/plugins/all-in-one-seo-pack/](https://wordpress.org/plugins/all-in-one-seo-pack/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/#post-5116042)
 * Hi Hopeless2,
 * Are you using the classic or the universal tracking code? Also, is this entirely
   using the All-in-One settings, or are you adding your own code for tracking things?
   In general, you should be able to manage this by entering your Tracking Domain
   and checking Track Multiple Domains.
 *  Thread Starter [Hopeless2](https://wordpress.org/support/users/hopeless2/)
 * (@hopeless2)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/#post-5116083)
 * Hi Peter,
 * I am using the universal tracking code and I am entirely relying on the All-in-
   One settings, I do not use any own or modified code.
    Like mentioned above I 
   have tried different tracking codes, and “Track Multiple Domains” is activated
   on every subdomain.
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/#post-5116104)
 * Hi Hopeless2,
 * This should largely work out of the box with Universal tracking; the “Track Multiple
   Domains” option will set allowLinker to true; also set your [Cookie Domain](https://developers.google.com/analytics/devguides/collection/analyticsjs/domains)
   appropriately (this uses the Tracking Domain option in All in One SEO Pack).
 *  Thread Starter [Hopeless2](https://wordpress.org/support/users/hopeless2/)
 * (@hopeless2)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/#post-5116108)
 * What do you mean by I should set it appropriately. I thought this is implemented
   in the code automatically, as long as I dont use any other code? My code looks
   like this:
 * <script>
    (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){(
   i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,
   m) })(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);
 *  ga(‘create’, ‘UA-30025735-1’, ‘auto’);
    ga(‘send’, ‘pageview’);
 * </script>
 * And it still does not work. 🙁 Could you at least tell me, which way should be
   correct? Should I use different views and the same tracking ID for all domains/
   subdomains or should I use different properties with different IDs or anything
   completely else?
 *  [Peter Baylies](https://wordpress.org/support/users/pbaylies/)
 * (@pbaylies)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/#post-5116109)
 * Yes, auto should work fine there; yes, you should use the same tracking ID.
 *  Thread Starter [Hopeless2](https://wordpress.org/support/users/hopeless2/)
 * (@hopeless2)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/#post-5116110)
 * Ok, I finaaaaaaaaaaaaaaaaaally have it! 🙂
    The problem was one of the filters
   I have had read about somewhere else. There somebody said the filter solved the
   issue for him. I do not know how – because for me it was the root of the problem!
 * However, everything seems to work fine now. And thanks for your help, especially
   as the mistake was on my side and not on the plugins! 🙂
 *  Thread Starter [Hopeless2](https://wordpress.org/support/users/hopeless2/)
 * (@hopeless2)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/#post-5116111)
 * .

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Google Analytics Multiple Domains’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

## Tags

 * [subdomain](https://wordpress.org/support/topic-tag/subdomain/)

 * 7 replies
 * 2 participants
 * Last reply from: [Hopeless2](https://wordpress.org/support/users/hopeless2/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/google-analytics-multiple-domains/#post-5116111)
 * Status: resolved