I have WP Multisite and now I want to track the different sites.
I’m using Multisite Domain Mapping to map www.mysite.com
to http://subsite.mysite.com
My questions is:
a) Do I need to add the same google analytics script to all themes?
b) when creating the script at GA, I have the following choices:
- A single domain (default)
- One domain with multiple subdomains
- Multiple top-level domains
Do I use nr 2 or 3?
I know there are plugins I can use. But I still have to create the scripts at GA, right?
Hook the script into the footer, which is easy enough.
http://wpmututorials.com/plugins/how-to-hook-into-the-footer/
As stated in the post, toss that into mu-plugins, it will track all your site, regardless of domain. GA can sort it out on their end.
totally do-able.
You need to find the right setup at GA first. There is an option where you select if you want to use it on a single domain or on multiple domains. Please see the description there as it depends on what you want to do on your site – and you have multiple options.
After you’ve made your mind about how you want to have it configured you should select the appropriate plugin and configuration. I don’t know from top of my head which of the many is fitting for a multi-site multi-domain setup. Probably other readers can share some practical experience for a recommendation.
GA operates with profiles, that is entity that you choose to view report for.
Choice between 2 and 3 is essentially choosing if you want to combine all of domains under single profile/report (but be able to distinguish sub-domains with filters and such) or you want completely separate profiles.
See My site has multiple domain names. How do I set up tracking?.