Project

General

Profile

Actions

Feature #3478

closed

Google Analytics and Mapped Domains

Added by scott voth over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Domain Mapping
Target version:
Start date:
2014-09-21
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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?

Actions #1

Updated by Boone Gorges over 9 years ago

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?

Actions #2

Updated by scott voth over 9 years ago

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.

Actions #3

Updated by Boone Gorges over 9 years ago

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.

Actions #4

Updated by scott voth over 9 years ago

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?

Actions #5

Updated by Boone Gorges over 9 years ago

  • 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?

Actions #6

Updated by Daniel Jones over 9 years ago

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.

Actions #7

Updated by Matt Gold over 9 years ago

  • Assignee changed from Daniel Jones to Boone Gorges

Thanks, Dan. Reassigning to Boone.

Actions #8

Updated by Boone Gorges over 9 years ago

  • Assignee changed from Boone Gorges to scott voth
  • Target version changed from 1.8 to 1.7.2

Thanks, Dan. This sounds about right. I've added the plugin in https://github.com/cuny-academic-commons/cac/commit/4ab82f5698977a6f1533dc5da49c4f9c5cad8d27.

Scott, I'm going to include this ticket in tomorrow's release. I'll update here when the release is live, and then I'll ask you to test on one of your Commons sites before closing the ticket out. Thanks.

Actions #9

Updated by Boone Gorges over 9 years ago

  • 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.

Actions #10

Updated by scott voth over 9 years ago

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.

Actions

Also available in: Atom PDF