Skip to content

Add google event tracking for active query items #1737

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

codytodonnell
Copy link
Collaborator

@codytodonnell codytodonnell commented Aug 14, 2025

Resolves #1698

Creates a custom useGtag hook from which we can track custom events inside any component. The first place this is being implemented is in the SearchSidebar and an event is triggered every time a new filter is added or updated. On the initial load, an event will be triggered for each active filter.

Note that we also created two Google Analytics "properties" for the NMDC Data Portal. One is for the production site. One is for the dev site as well as local development. Each GA property has its own GA ID associated with it. This ID gets pulled into the view app from an environment variable called VUE_APP_NMDC_GOOGLE_ANALYTICS_ID.

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.

Add ability to report statistics on user search behavior
1 participant