Repository navigation
docs: Document MauticJS.withdrawTrackingConsent() and /mtc/withdraw (7.3) - #988
promptless-for-oss wants to merge 4 commits into
Conversation
|
The
Both returned a 500 server error during the run, and both still returned 500 when Promptless checked them afterward. Every link on The check will keep failing until community.mautic.org serves those pages again, or until those links on |
|
@promptless-for-oss Could you add one sentence? When the website is on a different domain than Mautic and Restrict Domains is on in the CORS settings, the website's domain has to be in Valid Domains. Otherwise the browser blocks the request and the callback gets |
|
In reply to this discussion Thanks, I'm adding the CORS sentence (website's domain in Valid Domains when Restrict Domains is on) to this page now. I'll reply here once it's in. |
|
In reply to this discussion Thanks, I've added it. The page now says that when the website is on another domain and Restrict Domains is Yes, the website's domain has to be in Valid Domains, as for I also fixed a second point in this page and in the user docs (mautic/user-documentation#1247). Two browsers on the same device can share one device ID, so withdrawing consent in one browser also forgets the other. Both pages describe the code as it is now. If mautic/mautic#18400 changes how this works, that sentence needs updating. |
Open in Promptless
Description
Documents the tracking consent withdrawal API added in mautic/mautic#18400 (open, targets
7.x).docs/mauticjs_api/tracking_script.rstnow covers:MauticJS.withdrawTrackingConsent(callback)under MauticJS API functions: it's in theTRACKINGscope only, what it does in the browser, and what the callback receives. The method sends the device IDs from the cookie and local storage, removes them from the website only after Mautic responds with{"success": 1}, and can be called again afterfalse.POST /mtc/withdrawendpoint for consent managers that run where the tracking script isn't loaded: where Mautic takes the device IDs from (the parameter accepts two, separated by commas, and Mautic ignores any after the first two), which devices and cookies it clears, the response, including{"success": 0}when a User has logged in to Mautic in that browser, and that it accepts onlyPOST.MauticJS.trackingEnabledglobal, which the method sets back tofalse./mtc/event, or the browser blocks the request and the callback receivesfalse(review, reviewer request).The companion user-documentation suggestion covers the same change for site owners. Please merge this after mautic/mautic#18400 merges.
The source PR author confirmed the confirmation-first ID removal, the CORS requirement, and the shared-device limit in the source PR review replies and the PR description, so this revision needs no content change for them.
Validation

:xref:role is reported)docs/requirements.txtpins packages that need Python 3.13.5+, which this environment can't installLinked issue
Related to mautic/mautic#18391
Trigger Events