Add Google Analytics events to Playground - #1040
Merged
Merged
Conversation
adamziel
reviewed
Feb 20, 2024
adamziel
reviewed
Feb 20, 2024
| storage, | ||
| }); | ||
|
|
||
| // Add GA events for blueprint steps |
Collaborator
There was a problem hiding this comment.
Let's document what is being logged and why.
Collaborator
Author
There was a problem hiding this comment.
I added a readme file with more details. Let me know if there is a better place to document this.
adamziel
reviewed
Feb 26, 2024
adamziel
reviewed
Feb 26, 2024
adamziel
approved these changes
Feb 26, 2024
adamziel
left a comment
Collaborator
There was a problem hiding this comment.
I left two nitpicks, but other than that we're good to merge so I'm approving this PR 🎉
Collaborator
Author
|
Thanks for making these changes and merging! |
Member
|
Is there no consent request before loading these? I believe we need to enqueue analytics until we ask for and receive consent. |
Collaborator
Author
|
Analytics were already on the site, this PR just adds extra events. But that's a good point we should add a consent request. |
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR doing?
This PR adds support for sending Google Analytics events.
Events are sent when the Playground website loads. There is a general load event to track the number of loads, and separate events for each step that send just the step name.
What problem is it solving?
We would like to better understand if people are using the features we build specifically what steps are used and how frequently.
How is the problem addressed?
By sending step names to Google Analytics we will be able to track the total number of times a step has been used and compare it to the number of events created.
Testing Instructions
npm run devconsole.log(event, data);after this linewordpress-playground/packages/playground/website/src/lib/tracking.ts
Line 21 in 05105b8