track clicks to print frozen art on bulk certificate print page #45466
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.
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:
For other clues as to how this is working:
code-dot-org/pegasus/sites.v3/code.org/views/theme_common_head_after.haml
Line 9 in caa7b53
code-dot-org/pegasus/sites.v3/code.org/views/google_analytics.js.erb
Lines 10 to 12 in edb52b4
code-dot-org/pegasus/sites.v3/code.org/views/google_analytics.js.erb
Line 24 in edb52b4
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.