scientist-softserv / palni-palci

Other
1 stars 0 forks source link

SPIKE: Creation of a GA4 adapter (provider) for hyrax/hyku #451

Closed crisr15 closed 1 year ago

crisr15 commented 1 year ago

Summary

hyrax and hyku are currently using google analytics version UA, which is being decommissioned in July. In order to continue for hyrax to received analytics using google a new adapter (provider) needs to be made to work with GA4.

hyrax will need to be able to make calls to google analytics using GA4. Then the individual calls and reports will need to be modeled to work properly.

Acceptance Criteria

Testing Instructions

Notes

This issue on hyrax has some suggestions and next steps: https://github.com/samvera/hyrax/issues/5970

This documentations deals with the differences between V1 and V4 API calls for google analytics. Confirm we are using V1 before proceeding: https://developers.google.com/analytics/devguides/migration/api/reporting-ua-to-ga4#data-api-v1-request

And this documentation outlines the different dimensions for field names between V1 and V4. https://developers.google.com/analytics/devguides/migration/api/reporting-ua-to-ga4-dims-mets

PR for adding analytics initially to get an overview of the work: https://github.com/samvera/hyrax/pull/5089/files

crisr15 commented 1 year ago

Use google-analytics-data gem as it works with V4 and would let us wait until Legato was updated.

alishaevn commented 1 year ago

terminology

alishaevn commented 1 year ago

tasks

(all file references are in hyrax)

to be continued...

alishaevn commented 1 year ago

ref legato pr:

alishaevn commented 1 year ago

tasks

resources for rails

alishaevn commented 1 year ago

sample breakdown

(if we don't use legato and go with the google-analytics-data gem, that's another unknown risk. probably a 5-8)

crisr15 commented 1 year ago

Why are we restructuring matomo? Matomo is not broken and should not need to change.

And why this step: make ga4 the default for everything and set up the app to be without “google”: 2-3.? We want people to be able to use google, googleGA4 or matomo so I dont understand why it becomes the default for everything or why we are removing service from the other?

DiemBTran commented 1 year ago

Moving this to Client QA for further discussion

sephirothkod commented 1 year ago

@crisr15 I think the matomo restructure was an option that we talked about to make everything uniform, but not required as part of this work.

the step about the app being "without google" meant the app would be able to run GA4 as default without the need to rely on any of the old google analytics code (called 'google' in the code).

crisr15 commented 1 year ago

We would not want to remove any of the current google functionality until July as some users will not have switched over and we would want to contribute this back

alishaevn commented 1 year ago

(moving the convo from slack here since the questions were also asked here)

Why are we restructiring matomo? Matomo is not broken and should not need to change.

true, matomo works. the new structure would be in line with how google is though, as well as what we plan to do for ga4. so, more of a best practice change.

make ga4 the default for everything

google (ua) is the default for all things analytics right now. since it’s about to be deprecated, we need to change that.

and set up the app to be without “google”

the idea here is to make it easy to yank out the old google stuff once july comes since it won’t be of any use

alishaevn commented 1 year ago

context about next steps can be found in slack.

cazzerson commented 1 year ago

Thank you so much for working on this! We're trying to move to Matomo at UNC at Chapel Hill Libraries, and have discovered that the Matomo implementation is incomplete. This issue describes part of the problem. Basically, things like page view stats and public download stats aren't working for Matomo.

If we can be helpful with this work, please let me know. At a minimum, we have an active instance of Matomo that we can test against.