Skip to content

Add Google Analytics events to Playground - #1040

Merged
adamziel merged 5 commits into
trunkfrom
add/1022-ga-blueprint-events
Feb 26, 2024
Merged

Add Google Analytics events to Playground#1040
adamziel merged 5 commits into
trunkfrom
add/1022-ga-blueprint-events

Conversation

@bgrgicak

Copy link
Copy Markdown
Collaborator

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

Comment thread packages/playground/website/src/lib/tracking.ts Outdated
storage,
});

// Add GA events for blueprint steps

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's document what is being logged and why.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a readme file with more details. Let me know if there is a better place to document this.

@bgrgicak
bgrgicak requested a review from adamziel February 21, 2024 10:09
Comment thread packages/playground/website/src/lib/tracking.ts Outdated

@adamziel adamziel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left two nitpicks, but other than that we're good to merge so I'm approving this PR 🎉

@adamziel
adamziel merged commit 454fec3 into trunk Feb 26, 2024
@adamziel
adamziel deleted the add/1022-ga-blueprint-events branch February 26, 2024 13:27
@bgrgicak

Copy link
Copy Markdown
Collaborator Author

Thanks for making these changes and merging!

@dmsnell

dmsnell commented Feb 26, 2024

Copy link
Copy Markdown
Member

Is there no consent request before loading these? I believe we need to enqueue analytics until we ask for and receive consent.

@bgrgicak

Copy link
Copy Markdown
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.

@bgrgicak

Copy link
Copy Markdown
Collaborator Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants