Skip to content

Connect Fastly

Updated 29 November 2026

Add an HTTPS logging endpoint to your Fastly service so request logs reach Brandexa in real time.

What to know

Fastly streams request logs to Brandexa through an HTTPS logging endpoint. Any Fastly plan works. Brandexa never needs access to your Fastly account.

Before you start

  • You can edit the service and activate a new version in Fastly.

Steps in Brandexa

  1. Open Agent analytics, then Logs, and choose Connect request logs.
  2. Choose Fastly and pick the domain.
  3. Choose Show the endpoint details. Copy the custom header value. It is your source key and is shown once.

Steps in Fastly

  1. Open your service, choose Edit configuration and clone the active version.
  2. In the left menu choose Logging, then HTTPS, then Create endpoint.
  3. Fill in the fields listed below. Paste the log format and the custom header value.
  4. Under Advanced options set Select a log line format to Blank. The default adds a header to every line and Brandexa cannot read it.
  5. Choose Create, then Activate the new version.
  6. Return to Brandexa and choose Check status.
Endpoint fields
Name:                      Brandexa agent analytics
Placement:                 Format Version Default
URL:                       https://ingest.brandexa.com/v1/logs/fastly
Maximum logs / bytes:      leave empty
Content type:              application/json
Custom header name:        X-Brandexa-Source
Custom header value:       <YOUR_SOURCE_KEY>
Method:                    POST
JSON log entry format:     Newline delimited
Compression:               Gzip (or none)
TLS fields:                leave empty
Select a log line format:  Blank
Log format
{
  "timestamp": %{time.start.msec}V,
  "host": "%{if(req.http.Fastly-Orig-Host, req.http.Fastly-Orig-Host, req.http.Host)}V",
  "path": "%{json.escape(req.url.path)}V",
  "method": "%{json.escape(req.method)}V",
  "user_agent": "%{json.escape(req.http.User-Agent)}V",
  "status": %{resp.status}V,
  "bytes": %{resp.body_bytes_written}V,
  "country": "%{json.escape(client.geo.country_code)}V",
  "request_id": "%{json.escape(req.xid)}V",
  "is_edge": %{if(fastly.ff.visits_this_service == 0, "true", "false")}V
}

What to expect

Fastly cannot filter a log line by user agent, so requests from browsers are sent as well. Brandexa discards everything except recognised crawlers when it arrives. The format does not ask for the visitor's address or the query string. If your service uses shielding, only the edge line is counted, so a cache miss is not counted twice.

Brandexa keeps only requests from recognised AI crawlers and search engines. For each one it stores the time, host, path without the query string, method, status, size, country and crawler name. It does not store visitor addresses, query strings, cookies or the user agent text.

If something goes wrong

  • The endpoint fails Fastly's check. Brandexa answers the logging challenge automatically, so confirm the URL is typed exactly.
  • Nothing arrives. Confirm that the new version is active and that Compression is Gzip or none. Zstd and Snappy are not accepted.

Still need help?

If you have a question or something is not working, get in touch.

Contact us