Use Allowed Domains
Allowed domains control which page hostnames can boot a Tag Manager container.
Allowed domains are optional protection. If the list is empty, the container can boot anywhere the script is installed. If the list has domains, the runtime checks the current page hostname before booting the container.
Before you start
- know the page hostnames where the container should boot
- include test, staging, or production hostnames when those pages should boot it
- enter hostnames only, without protocol, path, query string, or port
- know whether the current published container should receive the updated list
Configure allowed domains
Open Integrate
Open the container, then choose Integrate.
The allowed-domain list can be saved from the container editor. When
Integrate is opened from the container list, the modal generates the script
but does not save container settings.
Add allowed hostnames
Enter one hostname per line or separate hostnames with commas.
Use values such as:
example.com
offers.example.com
checkout.example.comDo not include https://, paths, query strings, or ports.
Nitoriq normalizes saved values by trimming spaces, lowercasing the hostname, and removing protocol, path, port, and leading or trailing dots.
Use the selected domain when appropriate
If the selected tracking domain should also be allowed, choose Use selected domain.
The selected tracking domain is the domain that serves the script. Allowed domains are checked against the page hostname where the script runs.
Save the list
Choose Save.
Allowed-domain settings are stored on the container. The published container payload is what the installed script receives, so publish the container when the live script should receive the updated allowed-domain list.
Confirm runtime behavior
Open the page where the script is installed. If the page hostname does not match an allowed domain or one of its subdomains, the container will not boot.
Matching Behavior
If you allow example.com, the container can boot on:
example.comwww.example.comoffers.example.com
It will not boot on an unrelated hostname.
Allowed domains are correct when
- every intended hostname is included
- values are hostnames only
- test, staging, or production hostnames are included when they should boot the container
- the page hostname matches the list exactly or as a subdomain
- the selected tracking domain is not confused with the page hostname
- the updated list is published when the installed script should receive it
Was this page helpful?