Publish And Validate Container Changes
Publishing moves a container draft into the live version served by the installed container script.
Draft changes do not affect the website until the container is published. When publishing succeeds, Nitoriq stores compiled output, updates the container’s published version, and creates a new draft copy for later edits.
What Publishing Does
The publish action:
- saves the current draft from the editor
- compiles tags, triggers, variables, and container settings
- blocks publish when validation finds an error
- blocks publish when compiler warnings require review
- stores the compiled hash for the published version
- archives the previously published version
- creates a new draft based on the published version
The Publish Container button is available when the container has unpublished
changes and the current version is editable.
Publish and validate
Review unpublished changes
Open the container and look for the Unpublished changes badge.
Review the tags, triggers, and variables in the draft. Check that tags are attached to the intended triggers and template fields use existing custom or built-in variables.
Publish the container
Choose Publish Container, then confirm the publish action.
The editor saves the current draft before sending the publish request. The API then compiles and validates the draft. If publishing succeeds, the live script serves the new compiled version.
Read the publish result
After a successful publish, the UI shows a success toast and the unpublished changes badge clears.
If publishing fails, the error message comes from the publish or compile step. Common blocking issues include invalid tag, trigger, or variable settings, duplicate variable names, reserved variable names, invalid regex patterns, missing trigger references, missing condition variables, variable dependency cycles, unknown placeholders that require review, and compiled output that exceeds size limits.
Load the live page
Open a page where the container script is installed.
The page requests the published container script:
/niq/tags/CONTAINER_ID.jsThe container script loads the shared runtime:
/niq/tag-manager/runtime.jsThe container script can be cached for up to 5 minutes. A hard refresh or a new browser session can help when checking a recent publish.
Trigger the behavior
Perform the page load, route change, click, form submit, custom event, timer, scroll, or visibility behavior that matches the trigger.
Check evidence
Use browser developer tools, Nitoriq event logs, the receiving platform, or reports to confirm the result.
For Nitoriq events, the runtime sends batched events to:
/niq/evPublishing states
Draft
The editable version of the container.
Editor changes are stored here before publish.Published version
The compiled version served to the website.
The installed container script loads this version.Compiled hash
The hash for the compiled output.
It identifies the exact compiled output served by the script.New draft
A draft copy created from the version that was just published.
Future edits continue from the published configuration.Script cache
The published container script is cached for a short period.
A page can briefly keep loading the previous script after publish.Publish validation is complete when
- the publish action returns success
- the
Unpublished changesbadge clears - the live page requests
/niq/tags/CONTAINER_ID.js - the runtime request to
/niq/tag-manager/runtime.jssucceeds - the tested browser behavior matches the trigger
- the tag action appears in network activity, Nitoriq logs, the receiving system, or reports
Was this page helpful?