Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor analytics_events.js #6095

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

bbpennel
Copy link
Contributor

Refactor analytic_events.js to abstract away details of underlying providers implementation, since ga4 does not follow the same structure as the previous impls.

…oviders implementation, since ga4 does not follow the same structure as the previous impls.
@bbpennel
Copy link
Contributor Author

Does anyone know the reason why we disable the default page view event that matomo includes?
https://github.com/samvera/hyrax/blob/main/app/views/shared/_matomo.html.erb#L4
We could easily enough reenable it and disable the pageView event in analytics_events.js. In this PR, that is the way GA4 is working since pageView is one of the many automatic events. So only UA would be sending a custom page view event (I haven't researched whether that is needed or not).

Also, I left in deprecated stubs for the previous way of sending events in analytics_events.js in case anyone was directly sending events instead of sending them via event tags, but I'm fine with removing it if it doesn't seem necessary.

@bbpennel bbpennel changed the title Refactor analytic_events.js Refactor analytics_events.js Jun 19, 2023
@dlpierce dlpierce merged commit fdc117f into samvera:ga4-hyrax3 Jun 20, 2023
@bbpennel bbpennel deleted the ga4-hyrax3-gtag branch July 20, 2023 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants