VisitorType
← All posts

How to track AI bots on Shopify (and which ones you can't)

shopifyai-agentstracking

AI traffic matters differently for a store. A crawler reading your blog is a GEO question — but an AI assistant fetching a product page for a buyer, or an agentic browser walking your checkout, is revenue traffic. Shopify's architecture shapes what you can see, so let's be precise.

The five-minute install

No app required. In your Shopify admin: Online Store → Themes → Edit code → layout/theme.liquid, and paste the VisitorType snippet before </head>:

<script async src="https://visitortype.ai/tms.js" data-container="AITM-XXXXXXX"></script>

Every page of the storefront now classifies its visitors — humans, AI assistant fetches, agentic browsers, and AI referrals (people arriving from ChatGPT or Perplexity), with engagement and scroll depth per visit.

What you'll see — and what nobody can see on Shopify

An honest split, because Shopify controls the servers:

Visitor type Visible? Why
Humans (incl. AI referrals) Run JavaScript normally
Assistant fetches (ChatGPT-User, Claude-User, Perplexity-User) Tied to a live buyer asking about your products
Agentic browsers (agent mode, Comet & co.) Real browsers driven by AI — they execute the snippet
Pure crawlers (GPTBot, ClaudeBot) Never run JavaScript, and Shopify doesn't allow server-side middleware — invisible to every JS-based tool, not just this one

The good news: the visible rows are the commercially interesting ones. You see the AI agents that shop, not just the ones that scrape. For crawler policy, Shopify lets you edit robots.txt.liquid — decide those rules from the AI agent directory rather than blind template advice.

Why bother? Because agents buy differently

Agentic browsers don't watch your hero video or feel urgency banners. They read structure: prices, availability, shipping terms, return policies in parseable form. Knowing what share of your traffic they are — and which products they visit — tells you whether "optimize for agents" belongs on this quarter's roadmap or next year's.

Where VisitorType fits

Tag rules work on Shopify like anywhere else: keep bots out of your GA4 and ad pixels with a "Humans only" trigger, watch AI referral conversion separately, get an email the first time a new agent hits the store. Create a free account, paste the snippet, and check back after a week of real traffic.

See which AI agents visit your site — free.

Start with VisitorType