citlyze docs

Install AI Traffic tracking

Capture AI-referred visits with the browser snippet, Tag Manager, WordPress, or Cloudflare, and connect GA4 and Search Console.

This page covers everything that feeds AI Traffic: the capture installs and the optional Google connections. If you already installed crawler tracking server-side, that install reports AI-referred visits too, and you can skip straight to conversion events or Connect Google Analytics 4.

What gets tracked

Two different kinds of visitors need two different capture techniques:

VisitorRuns JavaScriptCaptured by
AI crawlers (GPTBot, ClaudeBot, ...)NoServer-side installs only
Humans referred by AI answersYesServer-side installs or the browser snippet

The server-side installs (Cloudflare, WordPress, custom server) capture both. The browser snippet and Tag Manager capture human referrals only, which makes them the right choice when you cannot run server-side code, and a complement, not a replacement, everywhere else.

Choose an install path

Your situationUse
Server-side install already runningNothing to add; visits already report
Site behind CloudflareCloudflare Worker (captures both kinds)
WordPressWordPress plugin (captures both kinds)
You manage tags in Google Tag ManagerTag Manager
Any site where you can add a script tagBrowser snippet

Browser snippet

The browser snippet is a small script served from the app. It reports a visit only when the session arrived from a recognized AI surface, and it identifies your site with a browser token, which is public and bound to your site key's domain, so it is safe in page source.

  1. In the app, go to AI Crawlers → Install tracking and open the Browser / GTM tab.
  2. Browser tokens require a site key with a registered domain. If the tab says so, add a domain to your site key first, then click Generate browser token.
  3. Copy the two-line snippet and paste it into your site's <head> (or before </body>), on every page:
<script>window.citlyze=window.citlyze||function(){(window.citlyze.q=window.citlyze.q||[]).push(arguments)};</script>
<script async src="https://app.citlyze.com/collect.js" data-token="cbt_YOUR_BROWSER_TOKEN"></script>

The first line is a stub that queues calls made before the script loads, so conversion calls never throw.

Google Tag Manager

Use Tag Manager when that is where your site's tags live. Two options:

  • Custom HTML tag: create a new Custom HTML tag, paste the same two-line snippet from the Browser / GTM tab, set the trigger to All Pages, and publish the container.
  • Community template: Citlyze ships an importable Tag Manager template. In Tag Manager go to Templates → New → Import, load the Citlyze template, create a tag from it, and enter your browser token.

Both do the same thing; the template just avoids raw HTML permissions in containers that restrict them.

Conversion events

Once a capture install is live, your site can report conversions with one call, using event names you allow first:

  1. On AI Crawlers → AI traffic, add the event names you want to accept under Capture settings → Conversion events (up to 10 lowercase names). Events not on the list are rejected.
  2. Fire the event from your site where the conversion happens:
window.citlyze("event", "signup");

Conversions are same-session: they are attributed to the AI source that referred the visitor who converted. While you are in capture settings, also add any Ignored IPs (office ranges, staging) so internal traffic stays out of the report.

Connect Google Analytics 4

The Google connection fills the AI Traffic report from GA4's own session data, which covers visitors your snippet cannot see, and it works before any install is in place.

  1. On AI Crawlers → AI traffic, find the Google Analytics & Search Console card and click Connect Google account.
  2. Sign in with a Google account that can view the GA4 property, and approve the read-only access shown on Google's consent screen.
  3. Back in the app, choose the GA4 property to sync and save.

The connection is read-only: Citlyze reads daily aggregated report data for the selected property (sessions, users, and conversions from AI-assistant sources, by landing page and date) and writes nothing to your Google account. Data syncs daily.

Connect Search Console

The same Google connection can sync a Search Console site: choose the site in the card after connecting. Search Console sync brings in daily clicks and impressions by page and date, which covers how your pages perform in Google Search's AI features alongside the referral data.

Disconnect and revoke

  • In the app, the card's Disconnect button removes the stored connection and the synced Google data for that provider.
  • You can also revoke Citlyze's access from your Google account's security settings at any time, after which no further Google data can be retrieved.
  • Switching to a different property or site replaces the previously synced data.

Privacy notes

  • Google access is limited to read-only reporting scopes approved on the consent screen; there is no write access.
  • The browser token is public by design; ingest checks the reporting page's domain against the site key's registered domain.
  • Referral events record the landing path, referrer, and coarse device and country context, not visitor identities.
  • Referral history is kept per your plan (30, 90, or 400 days); see Plans and limits.

Verify

The site keys table on Install tracking shows a Last event column that updates when your install delivers its first accepted report; AI-referral clicks count. AI-referred visits appear on the AI Traffic page once real sessions arrive; on low-traffic sites this can take a day or two. The Google card shows the synced session count once the first daily sync completes.

On this page