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 conversions in GA4 for when Firefox is set to default browser #13238 #13913

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

stephaniehobson
Copy link
Contributor

@stephaniehobson stephaniehobson commented Nov 21, 2023

One-line summary

Track conversions in GA4 for when Firefox is set to default browser.

Significant changes and points to review

  • Set the custom user dimensions indicating if Firefox is default.
  • Send the conversion event when the default is changed.
  • Add docs for default_browser_set and dimension_set
  • Fix bug on WNP 118 where dimension was reported twice

Issue / Bugzilla link

#13238

Testing

Local testing can be done to make sure the dataLayer has the expected data:

http://localhost:8000/en-GB/firefox/118.0/whatsnew/
http://localhost:8000/en-GB/firefox/116.0/whatsnew/
http://localhost:8000/en-US/firefox/set-as-default/thanks/

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1ad43b0) 76.72% compared to head (4e7b395) 76.98%.
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13913      +/-   ##
==========================================
+ Coverage   76.72%   76.98%   +0.26%     
==========================================
  Files         145      145              
  Lines        8008     7835     -173     
==========================================
- Hits         6144     6032     -112     
+ Misses       1864     1803      -61     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stephaniehobson stephaniehobson force-pushed the ga_set branch 2 times, most recently from 2b4c043 to 01e17fe Compare November 21, 2023 05:39
- Set the custom user dimensions indicating if Firefox is default.
- Send the conversion event
- Docs
- Fix a bug in WNP118 where dimension was set twice
@stephaniehobson stephaniehobson marked this pull request as ready for review November 21, 2023 05:44
@stephaniehobson stephaniehobson added P1 First level priority - Must have Needs Review Awaiting code review Review: XS Code review time: up to 30min Analytics 📈 labels Nov 21, 2023
Copy link
Member

@alexgibson alexgibson left a comment

Choose a reason for hiding this comment

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

r+ (feel free to ignore the suggestion on the event key naming if it's what we have to use)


window.dataLayer.push({
event: 'dimension_set',
firefox_isDefault: true
Copy link
Member

Choose a reason for hiding this comment

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

Nit: this is an odd mix of both snake_case and camelCase, is that something GA prescribes? I wondered if we could just stick to one (probably snake_case as that's what is used elsewhere mostly)?

@stephaniehobson stephaniehobson merged commit b6ef06d into main Nov 21, 2023
5 checks passed
@stephaniehobson stephaniehobson deleted the ga_set branch November 21, 2023 18:32
@stephaniehobson stephaniehobson removed the Needs Review Awaiting code review label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analytics 📈 P1 First level priority - Must have Review: XS Code review time: up to 30min
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants