VisitorType
← All posts

VisitorType grows a dataLayer: context_data, custom events, and human-verified conversions

productdatalayerevents

Until today, VisitorType triggers could see who a visitor is (human, AI crawler, assistant fetch, agentic browser) and where they are (path, URL, referrer). Now they can see what your site knows too.

context_data — the input dataLayer

If you've used Tealium's utag_data or GTM's dataLayer, you already know the pattern. Declare context before the snippet loads:

<script>
  window.context_data = { page_type: "product", brand: "acme", cart_value: 129.5 };
</script>
<script async src="https://visitortype.ai/tms.js" data-container="AITM-XXXXXXX"></script>

Every key becomes a trigger condition (context.page_type equals product) and a tag macro ({{context.page_type}}). Combined with the dimension only VisitorType has, you get rules like: retargeting pixel on product pages, but only for verified humans — or structured pricing facts injected only when an AI agent reads a product page.

Two conveniences: og_type and lang are auto-detected from your existing meta tags (zero setup on most CMSs), and single-page apps can merge updates with aitm.setContext({...}).

One deliberate limit: context never leaves the browser. It evaluates triggers and fills macros client-side; we don't want your product metadata — or anything that might ride along with it — on our servers.

aitm.track() — events, with numeric conditions

Pages aren't the only thing worth measuring:

window.aitm.track("purchase", { value: 89, currency: "EUR" });

Event triggers use the new Event name field (event_name equals purchase) plus anything else — including the new numeric operators: context.value greater_than 50. Event data flows into macros, so a conversion pixel can carry {{context.value}}.

The part that matters: that pixel fires after classification. Headless browsers, scrapers wearing Chrome costumes, and AI agents walking your checkout don't become conversions — because the trigger says visitor_type equals human and the classification is backed by IP verification. Bot-free conversion data isn't a filter you apply afterwards; it's how the tag fires in the first place.

See it work: ?vt_debug=1

Append ?vt_debug=1 to any page running the snippet: a small panel shows the visitor's classification (with the verification verdict), the context that was read, every tag with a ✓/✗ match, and each tracked event live. Debugging a trigger no longer means console spelunking.

Everything above ships in the ~3.4 kB (gzipped) snippet you already have — no reinstall, tags only change when you publish. Create a free account, set three context keys, and fire your first human-verified event this afternoon.

See which AI agents visit your site — free.

Start with VisitorType