
- MODX 3
- PHP 8.2
- Vue 3


Result: the block is in the HTML only when the session has the tag you set. The UTM registry requires PageBuilder Pro and capability utm. Rules that are already published still run in Free.
pagebuilder_inspector_visibility_enabled is on. While it is off, the inspector has no Visibility button.OnHandleRequest in the web context. If it does not, put [[!PageBuilderUtmSession]] above [[!PageBuilder]].{{utm:key}}. utm rule. It reads $_SESSION['utm'].The same dialog sets a list of MODX contexts. In Pro, with the conditions flag, settings.conditions covers guest, logged-in, and GET checks.
On the UTM tab add parameter campaign. In section fields the placeholder is {{utm:campaign}}.
On a cta section set Visibility to a utm rule: parameter campaign, allowed value spring. Open ?campaign=spring. The section is in the HTML. Open ?campaign=other. The section is not in the HTML.
With the tag, the block is in the page source. Without the tag, the block is absent, not hidden with display: none. Turning off the inspector button does not erase rules that are already stored.
Clear the rule in the dialog and save the resource. Turning off the inspector button does not stop rules that are already stored.