Document consent-aware Focus Item embedding (split Focus scripts) - #914
Document consent-aware Focus Item embedding (split Focus scripts)#914promptless-for-oss wants to merge 2 commits into
Conversation
Document the split Focus Item scripts from mautic/mautic PR #16926: the
Consent-managed vs Full tracking install options and the
enableMauticFocusTracking{id}() activation callback, the global
'Use Mautic consent for Focus tracking' setting, and the
{focus=ID|display}/{focus=ID|tracking} token variants. Also refresh the
now-stale Focus note in the tracking script page.
|
@promptless-for-oss the source PR was updated, re-check and update the docs. |
|
Thanks @patrykgruszka — picking this up now. We're re-checking the updated source PR (mautic/mautic#16926) and refreshing this documentation to match the current endpoints, tokens, and consent setting. We'll follow up on this thread once the updated changes are ready. |
Update the split-Focus-scripts documentation to match the now-ready state
of mautic/mautic PR #16926 (source head ebe9fdfb):
- Foreground the public window.MauticFocus.enableTracking(<id>) activation
API and remove the no-longer-existent enableMauticFocusTracking{id}()
callback.
- Rename the panel to 'Focus implementation' and describe the two external-
website options ('Consent-managed' / 'Full tracking') plus Landing Page
tokens without over-specifying UI chrome.
- Clarify the 'Use Mautic consent for Focus tracking' setting ('Script
modifiers' heading, default off, scope, and the no-consent-gating failure
mode), and add a runnable activation example, an :xref: to the developer
docs, and clearer actor guidance.
|
Update: we've refreshed this documentation to match the current source PR. Highlights: the install panel is now described as 'Focus implementation' with the two external-website options ('Consent-managed' and 'Full tracking'), the public activation API is documented as |
|
@patrykgruszka done — we've re-checked this documentation against the updated source PR and pushed the corrected changes. The key fix: the activation API is now documented as the public
One heads-up: the embed screenshot on this page still shows the old single-script panel and predates the 'Focus implementation' rename — let us know if you'd like it refreshed before merge. The PR is updated and ready for another look; since PR #16926 isn't merged yet, we'll reconcile again if further code changes land. |
Open in Promptless
Documents the consent-aware Focus Item embedding introduced by mautic/mautic PR #16926, which splits the Focus Item embed JavaScript so a site can display a Focus Item before tracking consent and activate tracking only after consent (GDPR).
Updated to match the now-ready source PR (head
ebe9fdfb). This suggestion was first drafted against an earlier draft of the source PR; it has been reconciled to the current implementation.In the "Deploying to a website" section of
docs/channels/focus_items.rst, this describes the renamed 'Focus implementation' panel, which offers two options for external websites — 'Consent-managed' (a display script plus a tracking activation snippet that calls the publicwindow.MauticFocus.enableTracking(<id>)API) and 'Full tracking' (a single snippet that activates tracking immediately) — plus copyable Landing Page tokens. It states plainly that Mautic doesn't record or verify consent; it only separates displaying the Focus Item from activating tracking.It also documents the global 'Use Mautic consent for Focus tracking' setting (off by default, under the 'Script modifiers' heading on the Tracking Settings tab) that bridges Mautic website-tracking consent to Focus tracking — including the scope limit (Consent-managed embeds only) and a warning that, without consent-managed website tracking, Focus tracking activates with no consent gating. The
{focus=ID|display}/{focus=ID|tracking}page-builder token variants are documented, and supporting cross-references were added/updated inconfiguration/settings.rst,configuration/variables.rst,configuration/tracking_script.rst, andcomponents/dynamic_web_content.rst. A newdocs/links/mautic_focus_item_scripts_docs.pyxref link points to the developer documentation.Reconciliation note: the earlier draft described a generated per-item
enableMauticFocusTracking{id}()callback; that named callback does not exist in the ready source. The documented public entry point iswindow.MauticFocus.enableTracking(<id>).Targets the 7.2 docs branch (source base 7.x).