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

Add Google Analytics to test environment #681

Open
2 tasks done
eporter23 opened this issue Dec 16, 2024 · 6 comments
Open
2 tasks done

Add Google Analytics to test environment #681

eporter23 opened this issue Dec 16, 2024 · 6 comments
Assignees

Comments

@eporter23
Copy link
Contributor

eporter23 commented Dec 16, 2024

While we have a GA account for production, we don't yet have one for the test environment.

Additional notes:
There are 2 options for configuring GA within a Hyrax application. One is more integrated with the application functionality, and another is simply adding the tracking code to the site HTML.

At this time, a major revamp of integrated reporting in Hyrax is still pending, but we may want to go ahead and try to use the more integrated Hyrax approach to take advantage of it in the future.

https://github.com/samvera/hyrax/wiki/Hyrax-Management-Guide#analytics-and-usage-statistics

@eporter23 eporter23 changed the title Add Google Analytics Add Google Analytics to test environment Jan 9, 2025
@bwatson78 bwatson78 self-assigned this Jan 15, 2025
@eporter23 eporter23 self-assigned this Jan 15, 2025
@eporter23
Copy link
Contributor Author

@bwatson78 I've configured a new Datastream within the existing OpenEmory property. The tracking info is linked above, but if you need more info let me know.

@bwatson78
Copy link
Contributor

As far as I can tell, we should be able to utilize Hyrax' built in tagging. I've also found that we could initialize Statistics reporting of the GA numbers if Statistics were fully integrated with Fedora Valkyrie, but we can cross that bridge when it's built.

@bwatson78
Copy link
Contributor

Places where we have tracking:
Work
FileSet
Collection

@bwatson78
Copy link
Contributor

It should be easy for us to add more tagging to pages by following the convention below:

<span class='hide analytics-event' data-category="collection" data-action="collection-page-view" data-name="<%= @presenter.id %>" >

@bwatson78
Copy link
Contributor

Necessary ENVs:

HYRAX_ANALYTICS=true
HYRAX_ANALYTICS_PROVIDER=ga4
GOOGLE_ANALYTICS_ID=
ANALYTICS_START_DATE=2025-01-01

@bwatson78
Copy link
Contributor

#713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants