feat(account): add pixel tracking consent checkbox on account edition - #23203
Open
AlexisAfonso wants to merge 2 commits into
Open
feat(account): add pixel tracking consent checkbox on account edition#23203AlexisAfonso wants to merge 2 commits into
AlexisAfonso wants to merge 2 commits into
Conversation
Add a country-gated pixel-tracking consent checkbox next to the existing marketing-email checkbox on the account edition form. It is offered to France (all of its territory) and Italy accounts only, and never renders anywhere else: outside that scope no rule is built at all. The country is re-read from the form on every field change rather than frozen at load, so editing the country select takes the checkbox away as soon as it leaves the scope and brings it back on return. The unsaved choice leaves with it, so a checkbox the customer can no longer see never travels in the payload, and coming back into scope rebuilds the box from the decision the GET returned. The checkbox is unchecked by default and stays disabled while marketing-email consent is not granted, since the API refuses that combination outright. Unchecking marketing email clears and disables it in the same UI update, and re-checking marketing email leaves it unchecked: re-subscribing to email never restores pixel tracking, so the customer has to opt back in explicitly. Its label names the mailbox the pixels would measure, and names the REGISTERED address rather than the one being typed into the email field above: a new address receives nothing until the customer confirms the changeEmail procedure from the current mailbox. Both consent states travel together in a single PUT /me/consent/consent-marketing-email/decision, which the fixed processing order makes safe, and the pixel key is omitted entirely when marketing email is revoked so the backend cascade applies. A refused pair re-fetches the decision and repaints both checkboxes rather than trusting the local state. The country list, the country predicate, the pixel.value reader and the payload builder live in a framework-free module so the account creation screen can reuse them as is. Pin the ui-kit checkbox icon against flex shrinking while here. It is a flex item in a row whose text can overflow, so a label long enough to wrap squeezed its box from 16px down to 4px while the square it paints, an absolutely positioned ::before, kept its 1rem: the text slid under the square and read as glued to it. Every checkbox of the form now shares the same box and gap. Only fr_FR is translated; the remaining locales are left to the CDS bot. ref: #MANAGER-22481 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Alexis AFONSO <alexis.afonso@ovhcloud.com>
AlexisAfonso
force-pushed
the
manager-tracking-pixel
branch
from
September 11, 2026 17:54
217537a to
90895cf
Compare
Signed-off-by: CDS Translator Agent <opensource@ovh.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add a country-gated pixel-tracking consent checkbox next to the existing marketing-email checkbox on the account edition form. It is offered to France (all of its territory) and Italy accounts only, and never renders anywhere else: outside that scope no rule is built at all.
The checkbox is unchecked by default and stays disabled while marketing-email consent is not granted, since the API refuses that combination outright. Unchecking marketing email clears and disables it in the same UI update, and re-checking marketing email leaves it unchecked: re-subscribing to email never restores pixel tracking, so the customer has to opt back in explicitly.
Both consent states travel together in a single
PUT /me/consent/consent-marketing-email/decision, which the fixed processing order makes safe, and the pixel key is omitted entirely when marketing email is revoked so the backend cascade applies. A refused pair re-fetches the decision and repaints both checkboxes rather than trusting the local state.
The country list, the country predicate, the pixel.value reader and the payload builder live in a framework-free module so the account creation screen can reuse them as is.
ref: #MANAGER-22481
Signed-off-by: Alexis AFONSO alexis.afonso@ovhcloud.com