Repository navigation
fix(container): no piano hit on refusal and manage cookies entry - #23306
Open
MehdiZaghouani wants to merge 7 commits into
Open
MehdiZaghouani wants to merge 7 commits into
MehdiZaghouani wants to merge 7 commits into
Conversation
MehdiZaghouani
requested review from
AlexisAfonso,
FabienHenon,
achrafHafedh,
anooparveti,
aottr and
clementdemily
and
a balanced review from Copilot
and removed request for
a team
October 15, 2026 12:37
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Stored refusal can leave startup hits available for later replay, and legacy navigation lacks the preferences action.
2 open findings
What changed in this PR
Updates CMP consent handling to prevent tracking on refusal and adds access to cookie preferences from the account menu.
Changes:
- Disables tracking immediately on refusal and drops hits emitted while disabled.
- Adds a CMP-ready “Manage cookies” action for EU/CA in reshuffled navigation.
- Adds menu tests and translations for eight locales.
| File | Description |
|---|---|
| packages/manager/apps/container/src/public/translations/user-account-menu/Messages_pt_PT.json | Portuguese menu label. |
| packages/manager/apps/container/src/public/translations/user-account-menu/Messages_pl_PL.json | Polish menu label. |
| packages/manager/apps/container/src/public/translations/user-account-menu/Messages_it_IT.json | Italian menu label. |
| packages/manager/apps/container/src/public/translations/user-account-menu/Messages_fr_FR.json | French menu label. |
| packages/manager/apps/container/src/public/translations/user-account-menu/Messages_fr_CA.json | Canadian French menu label. |
| packages/manager/apps/container/src/public/translations/user-account-menu/Messages_es_ES.json | Spanish menu label. |
| packages/manager/apps/container/src/public/translations/user-account-menu/Messages_en_GB.json | English menu label. |
| packages/manager/apps/container/src/public/translations/user-account-menu/Messages_de_DE.json | German menu label. |
| packages/manager/apps/container/src/container/nav-reshuffle/header/user-account-menu/Content.tsx | Adds gated cookie preferences action. |
| packages/manager/apps/container/src/container/nav-reshuffle/header/user-account-menu/constants.ts | Adds menu tracking identifier. |
| packages/manager/apps/container/src/container/nav-reshuffle/header/Header.spec.tsx | Tests preferences action and visibility. |
| packages/components/ovh-at-internet/src/ovh-at-internet.ts | Changes refusal handling and tracking queues. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| {sidebarTranslation.t('sidebar_account_kyc_documents')} | ||
| </a> | ||
| )} | ||
| {isCookiePreferencesAvailable && ( |
MehdiZaghouani
force-pushed
the
fix/MANAGER-22813-cmp-consent
branch
from
October 21, 2026 09:04
bc06ca0 to
aa916b1
Compare
| addEventURL: 'true', | ||
| cookieDomain: (window.location.hostname.match(/\..+/) || [])[0] || '', | ||
| campaignPrefix: ['at_'], | ||
| privacyDefaultMode: 'no-storage', |
Comment on lines
+131
to
+134
| setTimeout(() => { | ||
| if (!settled && !isApiReady()) failed = true; | ||
| settle(); | ||
| }, CMP_READY_TIMEOUT_MS); |
Comment on lines
+91
to
93
| const hasConsent = cookies[WEBSITE_PRIVACY_COOKIE_NAME]?.includes(WEBSITE_TRACKING_CONSENT_VALUE) ?? false; | ||
| if (hasConsent) { | ||
| trackingPlugin.init(true); |
A refusal went through the same path as an acceptance: the tag was initialised, a "cookie-banner-manager::decline" click was sent to Piano and tracking was only disabled afterwards. Piano's beforeConsent mode lets every event through, so that hit really left. A refusal now disables tracking synchronously, drops the hits queued while the banner was on screen and never initialises the tag. Hits emitted while tracking is disabled are dropped instead of queued, so a user who refuses, browses, then opts in from the CMP preferences does not get their whole session replayed to Piano. ref: #MANAGER-22813 Signed-off-by: Mehdi Zaghouani <mehdi.zaghouani@corp.ovh.com>
Mirrors the Manager V8 account menu: a "Manage cookies" entry opens the CMP preferences modal so the customer can review or withdraw consent at any time. Only shown in EU/CA (no CMP elsewhere) and once the CMP is actually up — when it failed and the legacy modal took over there are no preferences to open. ref: #MANAGER-22813 Signed-off-by: Mehdi Zaghouani <mehdi.zaghouani@corp.ovh.com>
On reload with a stored analytics refusal, the hits emitted before the CMP is ready (boot MV test, first page views) are queued while the tracker is still enabled, and the refusal only disables it. Opting in later from the CMP preferences re-enabled the tracker and replayed that queue to Piano. Re-enabling a tracker that was disabled now clears the retained queue first. A first-time consent still pending (tracker never disabled) keeps its queued hits. ref: #MANAGER-22813 Signed-off-by: Mehdi Zaghouani <mehdi.zaghouani@corp.ovh.com>
The legacy navigation is still served to EU/CA customers who have not opted into the reshuffle, and CookiePolicy mounts the CMP for both layouts, so they had no way to reopen their choices. The region and CMP-readiness gate now lives in a shared useCookiePreferencesAvailable hook used by both the reshuffled account menu and the legacy useful links, which gain a "Manage cookies" action. ref: #MANAGER-22813 Signed-off-by: Mehdi Zaghouani <mehdi.zaghouani@corp.ovh.com>
ref: #MANAGER-22815 Signed-off-by: Dustin Kroger <dustin.kroger.ext@ovhcloud.com>
Signed-off-by: Hazem Belkhiria <hazem.belkhiria.ext@ovhcloud.com>
MehdiZaghouani
force-pushed
the
fix/MANAGER-22813-cmp-consent
branch
from
November 3, 2026 13:07
72a105b to
122514e
Compare
| */ | ||
| private onUserConsentDeclined(): Promise<void> { | ||
| this.setEnabled(false); | ||
| this.clearTrackQueue(); |
This branch has not been deployed
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.


Description
Two follow-ups on the OVHcloud CMP integration (#23251):
cookie-banner-manager::declineclick was sent and tracking was only disabled afterwards. Piano'sbeforeConsentmode lets every event through, so that hit really left. A refusal now disables tracking synchronously, drops queued hits and never initialises the tag. Hits emitted while tracking is disabled are dropped instead of queued, so a later opt-in from the CMP preferences does not replay the session.Related
release/gcj-w40-v2(where the CMP lives), see feat(container): drive tracking consent through the OVHcloud CMP #23251