Tags, triggers & versions
The mental model is Google Tag Manager's: tags are things that fire, triggers decide when, and versionscontrol what's live. The difference is the vocabulary triggers speak — visitor type and agent identity are first-class fields.
Triggers
A trigger is a list of conditions, all of which must match (AND). Each condition is field · operator · value:
| Field | Meaning |
|---|---|
visitor_type | human, ai_crawler, ai_search, ai_assistant, ai_browser_agent, bot, unknown |
agent_name | Identified agent: GPTBot, ClaudeBot, ChatGPT-User, … |
agent_category | Same taxonomy as visitor_type, for identified agents |
referrer_source | AI platform that referred a human visit: chatgpt, perplexity, gemini, claude, … |
page_path | location.pathname, e.g. /pricing |
page_url | Full URL |
referrer | document.referrer |
Operators: equals, not_equals, contains, starts_with, regex. A useful regex: match any AI visitor with visitor_type regex ^ai_.
Don't want to build conditions by hand? The trigger editor ships one-click quick setups for the common cases: Humans only (remove bots & AI from pixels and analytics), AI visitors only, AI-referred humans, and AI crawlers only. Click one, tweak if needed, save.
Tag types
| Type | What it does | Config |
|---|---|---|
| Custom HTML | Injects HTML into the page; <script> tags execute | { "html": "..." } |
| Image pixel | Requests a 1×1 tracking image | { "url": "https://…" } |
| Data layer event | Pushes an event onto window.aitm.dataLayer | { "event": "…", "data": {} } |
A tag with no trigger fires on every page view.
Template catalog
23one-click templates generate the canonical vendor snippet from an ID — no copy-pasting from vendor docs. Each links to the vendor's official installation guide if you need to find your ID or go deeper. Pair every template with the Humans only trigger unless you have a reason not to.
| Analytics | Template fills in | Vendor docs |
|---|---|---|
| 📈 Google Analytics 4 | Measurement ID | Google ↗ |
| 📊 Plausible | Domain | Plausible ↗ |
| 🟢 Matomo | Matomo URL, Site ID | Matomo ↗ |
| 🦔 PostHog | Project API key, API host | PostHog ↗ |
| 🌫️ Fathom | Site ID | Fathom ↗ |
| 🍜 Umami | Website ID, Script URL | Umami ↗ |
| 🟣 Mixpanel | Project token | Mixpanel ↗ |
| Paid media | Template fills in | Vendor docs |
|---|---|---|
| 🎯 Google Ads Conversion | Conversion ID, Conversion label (optional) | Google ↗ |
| 🔵 Meta Pixel | Pixel ID | Meta ↗ |
| 💼 LinkedIn Insight Tag | Partner ID | LinkedIn ↗ |
| ✖️ X (Twitter) Pixel | Pixel ID | X ↗ |
| 🎵 TikTok Pixel | Pixel ID | TikTok ↗ |
| 🪟 Microsoft Ads UET | UET Tag ID | Microsoft ↗ |
| 📌 Pinterest Tag | Tag ID | Pinterest ↗ |
| 👻 Snap Pixel | Pixel ID | Snapchat ↗ |
| 🟠 Reddit Pixel | Pixel ID | Reddit ↗ |
| Email & CRM | Template fills in | Vendor docs |
|---|---|---|
| 🐵 Mailchimp | Connected Sites script URL | Intuit Mailchimp ↗ |
| ✉️ Klaviyo | Public API key / Site ID | Klaviyo ↗ |
| 💚 Brevo | Client key (ma-key) | Brevo (ex-Sendinblue) ↗ |
| 📮 MailerLite | Account ID | MailerLite ↗ |
| 🧲 HubSpot | Hub ID | HubSpot ↗ |
| Behavior | Template fills in | Vendor docs |
|---|---|---|
| 🔥 Hotjar | Site ID | Hotjar ↗ |
| 🔍 Microsoft Clarity | Project ID | Microsoft ↗ |
Versions & publishing
Saving tags and triggers never changes your site. When you hit Publish, the current set of enabled tags (with their trigger conditions resolved) is frozen into an immutable, numbered version — and that snapshot is what the snippet receives. Disable a tag and re-publish to remove it from the live config.
Recipes
Greet AI agents with structured pointers. Trigger: visitor_type regex ^ai_. Tag: Custom HTML injecting a note pointing at /llms.txt.
<div data-aitm-note style="display:none"> Canonical company facts: https://example.com/llms.txt Pricing: https://example.com/pricing — plans start at $29/mo. </div>
Keep human analytics clean. Trigger: visitor_type equals human. Tag: your GA4/Plausible snippet as Custom HTML — bots never inflate your numbers again.
Count assistant referrals. Trigger: visitor_type equals ai_assistant. Tag: Image pixel to your endpoint with ?agent={{agent_name}}&page={{page_path}}.