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

Collect stats about the numerical weather prediction model used by our visitors #143

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

julienrf
Copy link
Member

Since the app uses the same URL /v2 we can not monitor in the stats whether our users use the new interface to see the WRF results or the GFS results.

To address this issue, we replace the standard analytics script with a custom one that attaches a custom property to every “page view” event to indicate the underlying model (GFS or WRF).

As a consequence, we can now segment visits according to that property:

image

Alternatively, we could rewrite the URL to use distinct URLs such as /v2/gfs and /v2/wrf but I believe custom properties attached to the page view events are a cleaner way to track that information.

- Trigger a new page view every time the users change the model (WRF/GFS)
- Attach the underlying model as a property of the page view event
@julienrf julienrf merged commit 5e8457e into main Apr 23, 2024
1 check passed
@julienrf julienrf deleted the track-nwp-model branch April 23, 2024 08:41
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.

None yet

1 participant