Skip to main content
For teams whose only route onto the website is Google Tag Manager. The result is identical to pasting the script tag — the container just does the pasting. Where: Settings → Web Tracking → Install with Google Tag Manager.
The Google Tag Manager install drawer, with the template download and your pre-filled domain and key

The Google Tag Manager install drawer, with the template download and your pre-filled domain and key.

Why the template is generated for you

GTM requires a template to name the exact host it may load a script from, and it won’t accept a wildcard. A one-size-fits-all template would force every customer to hand-edit the permissions, and anyone who didn’t would get an install that fails for no obvious reason. So allGood generates the template against your domain, with both fields already filled in. Download it again whenever your domain changes — that’s the only reason to re-import.
1

Import the template

Select Download allgood.tpl.In GTM: Templates → New → ⋮ → Import, choose the file, then Save.
2

Add the tag

Tags → New → allGood Web Tracking → Triggering → All Pages → Submit.Both fields arrive pre-filled. Fire it on All Pages — that’s what page-view tracking needs. The script only loads once even if the tag fires on several events.
3

Check it works

The drawer has a Container id field and an Open test page button. Enter your GTM-XXXXXXX id and open the page.
Step three of the drawer, where you enter your container id and open the test page

Step three of the drawer, where you enter your container id and open the test page.

On that page, check these in order:
  1. GTM preview. Point GTM’s preview at the page URL. The allGood Web Tracking tag should show as fired once, with the status Succeeded.
  2. Readiness checks. Every check on the test page should be green. That means the script loaded, your domain is allowed, and your settings are valid.
If both pass, the install works. Your tag is loading allGood’s script, and allGood is accepting what it sends.To see real traffic arrive, visit your live site and then identify yourself. Fill out an allGood form, or click a link in an email allGood sent you. Visits are anonymous until then. Once allGood knows who you are, open your person page and look at the timeline. The page views from your visit should appear there.
  • Console: no message beginning [allGood], and window.allgood.version returns a version string.
  • Network: filter on _ag. The configuration request succeeds. Once consent allows it, the event request is accepted too.
  • No event request and no errors: the tag is holding events until the visitor answers your consent banner. See What consent gates.
In GTM mode the test page deliberately stops loading the script itself and lets your container do it — so what you’re testing is your tag, not a second install path that happens to work.
The test page link is signed with your container id. You can’t append a different id to an existing link — the page builds a script address from it, so an id anyone could add would be a way to make an allGood page load a container of their choosing.

If the tag reports a failure

The host it tried to load from doesn’t match the template’s permission. Download the template again from the drawer — it’s generated against your current domain. The tag reports the failure and GTM’s preview shows it, so you will see it before anything goes live.

The template editor’s Run button is not this test

Selecting Run in GTM’s template editor executes the template on Google’s own sandbox page. The console then warns that tagmanager.googleusercontent.com isn’t an allowed origin — which is correct, and actually means the tag loaded and reached allGood.Do not add that origin to your allowed list. It’s shared by every GTM template author in the world, so anyone’s sandbox could then send events into your account. Test on a page whose origin you control instead.
Two options, and they compose:
  • Let allGood handle it. Keep No tracking before opt-in on and make sure your consent platform writes its signal on every page. The tag holds and releases events on its own. This is simpler, and it works whether or not GTM knows about consent.
  • Let GTM handle it. Use GTM’s own consent triggers so the allGood tag doesn’t fire until analytics consent is granted. The allGood gate then has nothing to hold.
Don’t use GTM consent triggers and switch off allGood’s own gate — that leaves GTM as the only control.

Forms through GTM

Form capture works exactly the same way: the injected script binds any form on the page marked for allGood. The container’s job ends at loading the script.

What the tag decides

Nothing. It loads the script and reports back. Which events are captured, whether consent allows them, what a form’s fields are, whether a bot check is required — all of that is read at runtime from your allGood settings, so a settings change never means re-importing the template.