-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
✨ log grapher views to google analytics #4076
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @sophiamersmann and the rest of your teammates on Graphite |
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2024-10-22 14:22:11 UTC |
0a1cf71
to
64fcc54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very nice! I wonder if it would make sense to also do something like this for Explorers right away? There the whole navigation is even more interesting
yes, would be good to do now, also because this stuff is now fresh in my mind. I created an issue and added it to my cycle – I might have some time towards the end of the week |
5e45dd9
to
df5dcae
Compare
526fa8e
to
c3ee9a3
Compare
c3ee9a3
to
1d9ca33
Compare
Resolves #3834
Summary
A view event is logged to Google Analytics when Grapher is rendered.
Details
Logged events are of the following shape:
or, for multi-dim data pages,
grapherView
is stringified or not, so I went with the richer formatgrapherView
(e.g.source
,metric
) are always complete and sortedIf I understand correctly, Google Tag Manager always includes the current page, so there is no need to explicitly pass that for embedded Graphers.
Share menu refactor
Testing
I tested this code by console logging when an event is fired, but I haven't checked to see if these events actually end up in GA. (I asked Bobbie how to do this and will check later today)
Caveats
Not sure what's the right thing to do here, but I guess it doesn't matter that much and both are fine?