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

track clicks to print frozen art on bulk certificate print page #45466

Merged
merged 2 commits into from Mar 31, 2022

Conversation

davidsbailey
Copy link
Member

@davidsbailey davidsbailey commented Mar 24, 2022

Per request in the Congrats page spec, I'm adding a metric to see how often users click the button to print frozen art. Here it is in the network tab after I click the print button:

Screen Shot 2022-03-23 at 5 06 06 PM

For other clues as to how this is working:

Testing story

I've checked everything I can think of to try and track this event properly, including reading the GA docs and getting a 200 OK response in the screenshot. once it reaches production, I'll click the print button once on code.org/certificates to make sure I can see it show up somewhere in GA.

@@ -39,6 +39,7 @@
var printButton = $('#print_button');
if (printButton) {
printButton.click(function() {
trackEvent('frozen_print_gallery', 'print')
Copy link
Member

Choose a reason for hiding this comment

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

One suggestion is to use

trackEvent('clicks', 'frozen_print_gallery', 'print')

so that we avoid adding another top-level category when browsing with the GA UI.

Also, nit: missing ;.

Copy link
Member Author

Choose a reason for hiding this comment

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

thank you for your expertise here, Brendan!

@breville
Copy link
Member

The analysis looks good here. Out of interest, there is also a handy Chrome extension for confirming that these events are working.

@davidsbailey davidsbailey merged commit 81375b6 into staging Mar 31, 2022
@davidsbailey davidsbailey deleted the track-frozen-print-clicks branch March 31, 2022 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants