> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecliro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent traffic

> Detect how often AI crawlers and agents fetch your pages by deploying the Cliro Worker on Cloudflare.

**Agent traffic** shows how often AI crawlers and agents (like GPTBot and others) fetch your site. While AI referrals track *people* arriving from assistants, agent traffic tracks the *bots* that read your content to build AI answers.

<Note>
  This integration requires your site to be **behind Cloudflare** (any plan, including Free). Support for other platforms is planned.
</Note>

## Set up agent traffic

<Steps>
  <Step title="Connect in Cliro">
    Go to **Analytics → Agent traffic → Setup** and click **Connect**. Cliro shows your **Tracking Key**, an **Ingest Secret** (shown once — copy it) and the **Ingest Endpoint**.
  </Step>

  <Step title="Create a Cloudflare Worker">
    In Cloudflare, go to **Workers & Pages → Create Application → Create Worker**, name it (e.g. `cliro-crawler-detector`) and deploy.
  </Step>

  <Step title="Add the Cliro Worker script">
    Click **Edit Code**, paste the Cliro Worker script (download it from the setup screen), then **Save and Deploy**.
  </Step>

  <Step title="Add the secrets">
    In the Worker's **Settings → Variables**, add `CLIRO_TRACKING_KEY` and `CLIRO_SECRET` as secret variables, then save.
  </Step>

  <Step title="Attach the Worker to your domain">
    Under your domain → **Workers Routes → Add Route**, set the route to `*.yourdomain.com/*` and select your Worker.
  </Step>

  <Step title="Verify">
    Wait a minute for propagation, then send a test request with a crawler User-Agent. The crawler should appear in your Statistics within a couple of minutes.
  </Step>
</Steps>

<Tip>
  The Worker is transparent for normal visitors — if the request isn't from an AI crawler it adds no meaningful latency. When it is, it reports to Cliro fire-and-forget, without delaying your site's response.
</Tip>

## Reading the Statistics

The **Statistics** dashboard shows which AI crawlers visited, how often, and which pages they fetched — so you can see whether the assistants you care about are actually reading your content.

## Rotating the secret

If your Ingest Secret is exposed, use **Rotate Secret** to invalidate the old one. Update the `CLIRO_SECRET` variable in your Worker afterward.
