Skip to main content
AdLoop reads Google Tag Manager: accounts, containers, tags, triggers, variables, workspaces and the version history. The point is diagnosis. When a conversion goes missing, your AI can see which tag should send it, whether that tag is paused, what its trigger matches, and whether someone edited it without publishing. On AdLoop Cloud, access is read-only (tagmanager.readonly): AdLoop can’t change, create or publish anything in a container. The self-hosted edition can also make changes, as an opt-in; see Changes.

Connect

When you connect Google, leave Tag Manager ticked under Access for your AI (“Read containers, for tracking audits”). Then pick the Tag Manager account and the container, either during onboarding or later under Settings → Google → Change. With a single GTM account, the account step is skipped.Choosing a container is optional. Without one, the dashboard shows “Not selected — GTM tools ask per call”, and your AI passes the IDs on each call (it finds them with list_gtm_accounts and list_gtm_containers). Agencies pick a container per client under Settings → Clients.If the page says Permission missing — reconnect Google to enable Tag Manager, your Google connection was made without this permission (deselected, or from an earlier version). Click Reconnect and approve it; your other selections stay as they are.

What it reads

  • The live container. Tags, triggers and the event-coverage audit look at the published version, which is what actually runs on your site. Trigger conditions are turned into readable text, such as {{Page Path}} matches RegExp ^/pricing/.
  • Unpublished drafts. get_gtm_workspace_diff lists what was added, changed or deleted in a workspace but never published, plus merge conflicts. This is the usual cause of “I fixed the tag and nothing happened”.
  • History. list_gtm_versions and get_gtm_version list the published versions in order, with their names, notes and contents, so a drop in conversions can be matched to a specific publish. Google’s API doesn’t say who published a version or when; the version history in GTM itself shows that.
  • Variables. Custom variables plus the enabled built-ins. A trigger that uses {{Form ID}} never fires if that built-in isn’t enabled.

The event coverage audit

audit_event_coverage compares three sources: the events your website code sends, the GA4 event tags in the live container, and the events GA4 actually receives. Each event gets a status, for example ok, tag_paused, tag_active_but_not_firing, gtm_paused_but_firing or ga4_only. It is the GTM half of the tracking audit, which explains the workflow. The audit also needs a GA4 property.

Tools

  • list_gtm_accounts, list_gtm_containers: find account and container IDs
  • list_gtm_tags, get_gtm_tag: tag inventory, or the full configuration of one tag. With workspace_id, the tag and trigger tools read a workspace’s unpublished state instead of the live container
  • list_gtm_triggers, get_gtm_trigger: trigger inventory with readable conditions, or one trigger with every tag that uses it
  • list_gtm_variables: custom and enabled built-in variables
  • list_gtm_workspaces, get_gtm_workspace_diff: drafts and their unpublished changes
  • list_gtm_versions, get_gtm_version: publish history and the contents of one version
  • get_gtm_version_diff: what changed between two versions (by default, the latest version against the one before it): tags, triggers and variables added, removed or changed
  • audit_event_coverage: code ↔ GTM ↔ GA4 comparison per event
Parameters are in the tool reference; the toolset slug is gtm (toolsets).

Changes (self-hosted, opt-in)

The self-hosted edition can create and update tags, triggers and variables, delete them, publish a workspace, and roll the container back to an earlier version: draft_gtm_tag, draft_gtm_trigger, draft_gtm_variable, draft_delete_gtm_entity, draft_publish_gtm_workspace and draft_rollback_gtm_version. It’s off until you set gtm.write_enabled: true in the config. Turning it on asks for a new Google consent with the Tag Manager edit and publish permissions, and your Google account needs Edit (and Publish) rights on the container.
  • Tag and trigger drafts only change a workspace. Nothing reaches your site until a publish is applied, and the publish preview lists every pending change in the workspace, including other people’s edits.
  • Custom HTML tags and Custom JavaScript variables are refused unless gtm.allow_custom_html: true is set as well, also when a publish or rollback would bring one live.
  • Variables: Data Layer Variables, the usual source for GA4 ecommerce values, need just a name and the dataLayer key (ecommerce.value, ecommerce.transaction_id, …). Renaming a variable that tags or triggers use as {{name}} is refused, because the references would break (rename it in the Tag Manager interface instead), and so is deleting one that is still in use.
  • Every change goes through the preview and confirm flow. A publish returns the version it replaced, which is your way back.

Limits

  • Dynamic-event tags (an event name taken from {{Event}}) and Custom HTML tags can’t be interpreted automatically. The audit lists them separately for a manual look.
  • On AdLoop Cloud, Tag Manager calls are unmetered on every plan; see plans and limits.
  • On a solo plan or a client-scoped key, calls for a container other than the selected one are refused.

What AdLoop stores

On AdLoop Cloud: the selected GTM account ID, container ID and container name, next to your encrypted Google token. Container contents pass through and are never stored. Self-hosted: only the IDs you put in config.yaml.