-
Notifications
You must be signed in to change notification settings - Fork 928
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
Add ToS marketing opt out page (Fixes #15946) #15992
Conversation
7a49a2c
to
139af5c
Compare
139af5c
to
b9294ee
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15992 +/- ##
=======================================
Coverage 79.57% 79.57%
=======================================
Files 160 160
Lines 8396 8396
=======================================
Hits 6681 6681
Misses 1715 1715 ☔ View full report in Codecov by Sentry. |
b9294ee
to
916b75b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very minor question and nits on in-progress review
|
||
{% block canonical_urls %}<meta name="robots" content="noindex,follow">{% endblock %} | ||
|
||
{% block experiments %}{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question (non-blocking): My understanding is that inheritance goes back from download to base to base-protocol, and the experiments block in base protocol is already empty. Why do we need to redeclare an empty block here and in the tech.html
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will basically ensure that if any experiments are run in firefox/new/desktop/download.html
, overriding the block here will make it so the experiment won't also trigger on this custom page.
<label for="{{ id }}" class="marketing-opt-out-checkbox-label hidden"> | ||
<input type="checkbox" id="{{ id }}" class="marketing-opt-out-checkbox-input"> | ||
<span class="marketing-opt-out-text"> | ||
{% set attrs = 'href="https://support.mozilla.org/kb/marketing-data" target="_blank" rel="noopener"' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (potentially blocking) I only see "Placeholder Bug 1933833" at this link. Is that going to be updated before this launches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good call out, but I don't think this is a blocker. No traffic will go to this page until everything is ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The built-in tests are excellent and the logic breaks down really cleanly 🥇
Successfully tested with:
- geo US (show checkbox)
- geo FR (no checkbox or attribution)
- GPC setting on (no checkbox or attribution)
- Previously rejected (no checkbox or attribution)
- Chrome 133, Safari 18.1.1, Edge 132, Firefox 135
- checking one checkbox checks them all
- unchecking one checkbox unchecks them all
- unchecking sets consent pref cookie
- checking sets attribution cookies
The only blocking issue I have here is for IE 10/11 and it might just be misunderstanding of expectation. I see no checkbox to opt out of attribution (see comment). If it seems like this is a bug, we might need to check on an actual windows computer (I tested on browserstack, and none of my console logs showed up, don't know if the file wasn't running because of IE or browserstack)
{% if settings.STUB_ATTRIBUTION_RATE %} | ||
{{ super() }} | ||
<!--[if IE 9]><!--> | ||
{# Ensure opt-out runs in IE 10 / 11 since we also support stub attribution for those browsers. #} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maureenlholland my guess is this is a problem with webpack's dev mode not working in IE on localhost.
I pushed this branch up to a demo here: https://www-demo1.allizom.org/en-US/firefox/landing/get/
It seems to work for me in IE 9/10 - care to give it a try there? thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good instinct, demo link works for me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+ ⚙️
One-line summary
/firefox/new/
, at request of the product team.Significant changes and points to review
The "opt-out" checkbox is effectively a full opt-out of analytics and attribution in general, using the same cookie as our consent banner / cookie settings page. The only new detail is that because it is "opt-out" and not "opt-in", when someone unchecks the input, we must "undo" things like removing attribution parameters from download links and removing the existing attribution cookie.
The checkbox will only appear if:
/privacy/websites/cookie-settings
page, or unchecking the checkbox previously).Issue / Bugzilla link
#15946
Testing
http://localhost:8000/en-US/firefox/landing/get/