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

# Netlify

> Send Netlify traffic logs to Agent Analytics with a Log Drain to a general HTTP endpoint.

A Netlify Log Drain posts your site's traffic logs to Quotable as JSON. Nothing runs in your request path.

## Requirements

* **Netlify Enterprise.** Log Drains are an Enterprise feature on Netlify.
* Permission to manage the site's Log Drains.

**What it measures:** every field except **cache status**.

## Set up

**1. Create the source in Quotable**

In **Agent Analytics**, select **Connect source**, choose **Netlify** and select **Generate credentials**. Copy the token and the endpoint URL.

**2. Create a Log Drain**

In Netlify, open the site, go to the Log Drains settings and enable a drain:

* **Log type**: **traffic logs** only. Function and edge function logs don't describe requests and are dropped as `invalid_record`.
* **Destination**: general HTTP endpoint, with your endpoint URL.
* **Header**: `Authorization` with the value `Bearer aa_live_…`.

**3. Confirm delivery**

Select **Check now** in Quotable.

## Deploy previews and branch deploys

Only production traffic is counted. Records from a deploy preview or branch deploy are dropped as `environment_filtered`, so a preview's crawls don't distort your production numbers.

## Rotate the token

1. Rotate the token in Quotable. The old token stops working immediately.
2. Edit the drain's `Authorization` header in Netlify.

## Disconnect

Delete the drain in Netlify, then disconnect the source in Quotable.

## Troubleshooting

| Symptom | Likely cause | Fix |
| - | - | - |
| `401` | Header missing, or token wrong or rotated | Check the drain sends `Authorization: Bearer aa_live_…`. |
| `invalid_record` on every record | The drain sends function or edge function logs | Select traffic logs only. |
| `environment_filtered` on every record | The traffic is from a preview or branch deploy | Expected. Production traffic is counted. |
| `host_mismatch` | The site serves another domain | Connect that domain as its own source. |

## Next steps

> [card] [Read the dashboard](https://docs.usequotable.com/agent-analytics/dashboard.md)
>
> What to look at once data arrives.

> [card] [Troubleshooting](https://docs.usequotable.com/agent-analytics/troubleshooting.md)
>
> Fix deliveries that fail or arrive empty.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.