Feature #3478
closed
Google Analytics and Mapped Domains
Added by scott voth over 10 years ago.
Updated about 10 years ago.
Category name:
Domain Mapping
Description
Hi - I was asked to set up Google Analytics for a mapped domain (josephmurphyblog.org). I wasn’t sure it would work – but set it up anyway – and it doesn’t appear to be working. Am I right that this is not possible? Or is there a way to do it? I tried with the “josephmurphyblog.commons.gc.cuny.edu” url. Is there an alternate pathway?
Scott - I don't know much about this, but I would guess that you'd need to use the mapped domain rather than the commons.gc.cuny.edu domain. Can you try that?
Hi - I tried that and a number of other ways, but nothing seems to work. Just wondering what we should tell the member about this.
Hm. Do we have a Google Analytics plugin that would allow the user to enter a code that he set up for his own account? I have a feeling that's what'll be necessary.
There isn't one currently - I see there is a plugin called WP Google Analytics that seems to do the trick - but is there a problem with other, non-mapped sites installing it, since we have GA running sitewide?
- Tracker changed from Support to Feature
- Status changed from New to Assigned
- Assignee changed from Boone Gorges to Daniel Jones
- Target version set to 1.8
Thanks for looking, Scott. Google suggests that it should be possible to have more than one: https://support.google.com/analytics/answer/1032400?hl=en But this is going to take some investigation by our team - we have to make sure that the plugin we adopt will use the correct syntax. I'm going to put this into the 1.8 for more examination. Please let the requester know that we don't currently support this feature, but we plan to adopt it in the future.
Dan - Can I ask you to follow the Google support link above, and then compare the plugin that Scott mentions with the Google Analytics code that we're currently using, and make some recommendations about what (if anything) needs to be done to make this work on the Commons?
So it looks like our current site-wide GA is using Google's analytics.js, which supports multiple tracking codes. The plugin that Scott found looks like it uses Google's ga.js, which only supports one code. However, you can have one ga.js code and multiple analytics.js codes, so it looks like as long as the only GA codes being added are through our site-wide implementation (which I found in plugins/bp-custom.php - is that right?) and the WP Google Analytics plugin, there shouldn't be any conflict. Or even if people added another GA code using analytics.js it'd be fine. Only problem would be if someone added another code via ga.js, but that wouldn't conflict with out site-wide tracking, just the other tracking that they had added. Does that all make sense? Seems like it'd be fine to add this plugin to me.
- Assignee changed from Daniel Jones to Boone Gorges
Thanks, Dan. Reassigning to Boone.
- Assignee changed from Boone Gorges to scott voth
- Target version changed from 1.8 to 1.7.2
- Status changed from Assigned to Resolved
Hi Scott - The release is now live. I'm going to mark the ticket as resolved since the plugin is now available on the server, but I would like to ask you to do a bit of testing to make sure that it's possible to activate a separate analytics account. If you find that there are problems, feel free to reopen with details.
I used the plugin on one of my test sites on the Commons, and set it up on my own Google Analytics property, added a filter and it is working fine. Thanks. I will inform the member that this is an available option.
Also available in: Atom
PDF