Get Started With Nitoriq Tag Manager
Use this guide to understand how Nitoriq implements the tag manager model.
Tag Manager works from a container. The website loads the container script. The container’s published version tells the runtime which tags, triggers, and variables to use.
Before you start
- use an account that can manage Tag Manager in the selected workspace
- have a tracking domain available when a generated script is needed
- know which site template, page, or application shell will load the script
- know the hostnames that should be allowed if allowed-domain protection is being used
- know which page values are available when tags or variables need selectors, query parameters, cookies, data-layer values, or DOM values
Core Model
A container is the website installation record. It stores the container name, allowed domains, draft version, published version, tags, triggers, and variables.
A tag is an action. Supported tag types include Report Conversion, Click CTA, Replace Links, Append Query Parameter to Link, Custom Event,
Custom Image, Custom HTML, and Custom JavaScript.
A trigger is a browser event listener plus optional conditions. Supported
trigger types include DOM Ready, Window Loaded, Route Change, Click,
Form Submit, Custom Event, Timer, Scroll Depth, and Element Visibility.
A variable is a named value. Variables can read URLs, referrers, query parameters, cookies, JavaScript values, Nitoriq data-layer values, GTM data-layer values, DOM values, auto-event values, constants, random numbers, or custom JavaScript results.
Publishing compiles the current draft and updates the version served by the installed container script.
Work through a container
Open Tag Manager
Open Tag Manager from the app sidebar.
The page lists active containers. Use search to find a container by name. Use
Filters and the Archived option to switch the list to archived containers.
Create or open a container
Choose New Container to create a container. The creation modal asks for the
container name. After creation, Nitoriq creates draft version 1 and opens the
container editor.
Open an existing container from its card when the container already exists. Archived containers cannot be opened from the active container list until they are restored.
Generate the install script
Use the script field in the container header or choose Integrate.
Integrate lets you select the tracking domain used in the script URL. The
modal also includes Allowed domains, which can be empty or contain one domain
per line. Commas are also accepted. Use selected domain copies the selected
tracking domain into the allowed-domain field, and Save stores the allowed
domain list on the container.
The generated script has this shape:
<script async src="https://YOUR_TRACKING_DOMAIN.com/niq/tags/CONTAINER_ID.js"></script>Edit tags, triggers, and variables
Use the Tags, Triggers, and Variables tabs inside the container editor.
Tags can reference one or more triggers. Triggers can use conditions based on page, referrer, Nitoriq context, data layer, event, click, and form fields.
Variables can be inserted into tag fields and variable-aware inputs with
templates such as {{order_id}}. Formatting can trim, change case, set
defaults, add prefixes or suffixes, replace text, or encode and decode URL
values.
Each table includes create, search, last updated, and row action controls. Row actions support edit, duplicate, pause or resume where the record has an enabled state, and delete.
Publish the container
Use Publish Container when the draft should become the version served by the
installed script.
Publishing saves the draft, compiles the runtime payload, marks the draft version as published, archives the previous published version, and creates a new draft from the published configuration.
The Unpublished changes badge appears when the current draft is different
from the published version.
Runtime Behavior
When the container script loads, it registers the container payload and loads the Tag Manager runtime. The runtime checks allowed domains before booting the container.
If the hostname is not allowed, the runtime marks the container as booted and does not run the tags. If the container is archived or has no published version, the public script endpoint does not serve live container behavior.
Tags that emit Nitoriq events send those events into the existing tracking stream. Conversion events can include conversion type, revenue, transaction ID, conversion parameters, and Tag Manager metadata such as container ID, version ID, tag ID, trigger ID, and page URL.
Debug Context
The runtime enables debug output when the page has niq_debug=1 or
niq_debug=true in the query string, or when localStorage.niq_debug is set to
1.
Debug mode records trigger evaluation, tag firing, blocked tags, rewritten links, conversion dedupe, sandbox messages, and custom JavaScript errors in the runtime debug state.
The workflow is represented in Nitoriq when
- the container appears in the correct workspace
- the generated script uses the expected tracking domain and container ID
- allowed domains are empty or match the hostnames where the script should boot
- tags are connected to the triggers that should fire them
- variables used in templates exist with matching names
- the draft has been published when the installed script should receive the current configuration
Was this page helpful?