Project

General

Profile

Actions

Bug #10722

closed

StatPress performance & migrate to per-site Google Analytics

Added by Boone Gorges about 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Analytics
Target version:
Start date:
2018-11-17
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

We disabled StatPress for new users some time ago, but for existing users, it's a true beast. The database tables are enormous and poorly designed, and the admin is so slow on large sites to be near unusable.

It will be tough to take away people's stats without having a good replacement. I know that we have given per-site access to Google Analytics in the past. Scott, would you mind providing info on how many people are using this, and how hard it is for you to set up when it's requested?

I'd like to explore the possibility of simply removing StatPress from the system, which would mean removing the corresponding database tables. This likely means preparing some sort of report on where it's activated. Some sites that have it turned on may not be active anymore, or may be using a custom Google Analytics report instead. In those cases, it'll be pretty painless to remove.

We may look into a better system for allowing people to link their sites to their own Analytics accounts. See https://support.google.com/analytics/answer/1032400?hl=en. This could be self-service.

In the meantime, there may be things we can do to mitigate the awful performance. See https://www.saotn.org/optimize-wp-statpress-plugin-database-performance/


Files

Screenshot_2019-03-13_14-37-04.png (19.4 KB) Screenshot_2019-03-13_14-37-04.png Boone Gorges, 2019-03-13 03:43 PM

Related issues

Related to CUNY Academic Commons - Feature #5581: Explore alternatives to Google AnalyticsAssignedValerie Townsend2016-05-21

Actions
Actions #1

Updated by scott voth about 6 years ago

Hi Boone - We have 49 views right now on Google Analytics. It doesn't take too long to set up the view, create a report, notify the user, and make sure it is working - probably about 30 minutes. I think we are reaching our limit of views (50 per property) but apparently you can add properties to an account and accounts to a login - I am not actually sure how this works - see http://gatipoftheday.com/google-analytics-account-limit-raised-from-25-to-100/#

Actions #2

Updated by Boone Gorges about 6 years ago

  • Assignee set to Boone Gorges

Thanks, Scott. I'm going to research this a bit more. I think our best path forward may be to allow users to enter their own Google Analytics account info into their WordPress site, and then to transition existing StatPress users over to that system. I'll take some time in the upcoming month or two to see exactly how this would work.

Actions #3

Updated by Boone Gorges almost 6 years ago

  • Category name set to Analytics
Actions #4

Updated by Boone Gorges almost 6 years ago

I did some research into existing WordPress tools that would serve our purposes. They are all extremely bloated, and none appears to work both with Multisite and with multiple GA IDs on a single page.

So I've written a bare-bones implementation in https://github.com/cuny-academic-commons/cac/commit/f23c17da99ea666962ddaae47f67580c4e961898. On wp-admin/options-general.php, I've added a "Google Analytics ID" field. If filled-in, a second GA property is added to the pageview tracker. See screenshot for the admin interface.

As currently built, it's automatically active on every Commons site. Obviously, it will only do something if the admin has filled in a GA ID. I did this to minimize overhead - this way, there's no plugin to activate. However, it does make the feature seem like it's officially endorsed by the Commons, which we might not like - though we do already use GA throughout for our own purposes.

You'll see in the screenshot that I've given a very brief description of what a Tracking ID is, and then there's a "Learn More" link. I imagine that this would be a Commons help page explaining what GA is, and a brief primer on how to create a property, get the Tracking ID, enter into the Commons, and access the GA reports.

Scott, Matt, what do you think?

Actions #5

Updated by Matt Gold almost 6 years ago

Wow, Boone -- this seems really promising! Just today, Lisa was noting that she wasn't receiving reports from GA (I've cc'ed her here)

Just so I understand, people would be able to connect their own personal GA ID to their Commons site through this plugin? And then, to check stats, they'd just log in to GA to see them? That sounds like a really great option for our members!

Actions #6

Updated by Boone Gorges almost 6 years ago

Just so I understand, people would be able to connect their own personal GA ID to their Commons site through this plugin? And then, to check stats, they'd just log in to GA to see them? That sounds like a really great option for our members!

Correct. Some of the existing WP-GA tools put GA visualizations and data right into the WP Dashboard. A nice feature, but adds a ton of overhead.

Actions #7

Updated by scott voth almost 6 years ago

Looks good to me as well. GA can be overwhelming though - I guess we can provide an introduction to how it works and then send members to GA's documentation and tutorials.

Actions #8

Updated by Boone Gorges almost 6 years ago

Thanks, Scott. The documentation will be the most important thing to make this successful, which is why your thoughts are valuable :) But I agree 100% that we don't need to provide anything approaching complete docs for GA. There's tons of good documentation out there, and we should just link to a bit of it. The main thing would be the process of creating a property and getting the ID to enter into the Commons interface. If you think it's doable for you to prep this kind of documentation for 1.15, then let's go with this. (I'll get it all set up on cdev within the upcoming week or so, so that you can play with it.)

Actions #9

Updated by scott voth almost 6 years ago

Sure. It sounds doable for 1.15. I'm assuming we will just leave the views we have on our property (less that 25)?

Actions #10

Updated by Boone Gorges almost 6 years ago

Yes, I think we can leave them.

I'm more concerned about StatPress users. It'd be nice to move them to the new system. But this is something we can talk more about after 1.15.

Actions #11

Updated by Raymond Hoh almost 6 years ago

  • Related to Feature #5581: Explore alternatives to Google Analytics added
Actions #12

Updated by Lisa Rhody almost 6 years ago

I think the self-service option would be awesome. I did notice that our monthly stats report dropped off, and it would be good to have something as we prepare to launch the new site so that we can track deltas. Thanks for considering this, and looking forward to helping however we can.

Actions #13

Updated by scott voth over 5 years ago

I have created a help page for this - https://help.commons.gc.cuny.edu/setting-up-google-analytics-on-your-commons-site/

Is the "Learn More" hyperlink going to point to this page?

Actions #14

Updated by Boone Gorges over 5 years ago

Thanks, Scott! I've pointed 'Learn More' to that page.

Actions #15

Updated by Boone Gorges over 5 years ago

  • Status changed from New to Resolved

Let's create a new ticket to track the migration away from StatPress. This one, for per-site GA, should be marked resolved.

Actions

Also available in: Atom PDF