analytics-reporter icon indicating copy to clipboard operation
analytics-reporter copied to clipboard

Extension to allow multiple GA accounts?

Open madmatt opened this issue 8 years ago • 6 comments

Hi there,

This could be an awesome cross-site tool if it were able to connect to multiple Google Analytics sites data, without needing to have them all within one GA account. Is that a massive architectural headache? If I were to work on it, providing it's backwards-compatible, would it be useful to include?

I can see this being more helpful where there isn't an overarching Digital Analytics Program within government, but where individual sites still want to collaborate.

This might also make it easier for individual websites to participate, by filling out a form with the required details (private keys, account IDs etc.) on the web layer, and having them start updating immediately, instead of needing to amend existing websites with new GA codes (and also dealing with the data segmentation when doing that).

Thoughts would be appreciated, I think we could get some traction for this within the .govt.nz space if that were possible.

madmatt avatar Mar 03 '17 03:03 madmatt

@madmatt I think the main issue is doing the aggregation work to make requests to multiple accounts and to correctly sum their data together. It doesn't quite Just Work at the API level, so analytics-reporter will need to absorb that complexity and return data in the same schema it does now but for data from multiple reports merged together. Why don't you give a shot at modifying analytics-reporter to do this for simple queries and test out the complexity of adding such a feature?

konklone avatar Mar 03 '17 04:03 konklone

Documenting here - I've had related conversations with several local/state gov entities in the US about a similar need, since most do not have a unified / "roll up" GA account across all web properties.

laurenancona avatar Mar 06 '17 22:03 laurenancona

Having had a look at the code (but without running it yet), it seems like we could just make the deploy/envs directory .gitignored, then use that directory to contain .env files for different environments. Along with including the current ANALYTICS_REPORT_IDS, AGENCY_NAME and AWS_BUCKET_PATH, we could then add the ANALYTICS_REPORT_EMAIL, ANALYTICS_KEY_PATH and other secrets envs in there too...

I might try and play around with that this weekend :)

madmatt avatar Mar 08 '17 12:03 madmatt

This thread is a bit old, but I thought I might check in to see if this has gone any where. From what I've gathered, the ability to have an option for "All Participating Websites" is based on having a unified or "roll up" account and as @laurenancona mentioned not everyone has access to that.

mrjlaforest avatar Aug 19 '20 15:08 mrjlaforest

Hi @mrjlaforest! Yes, you are correct. At this time, regrettably, the aggregation is done in our GA account itself and analytics-reporter does not have this functionality. Apologies!

tdlowden avatar Aug 20 '20 12:08 tdlowden

No need to apologize. It is still a great application and we will be using it.

mrjlaforest avatar Aug 28 '20 13:08 mrjlaforest