Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.siteline.ai/llms.txt

Use this file to discover all available pages before exploring further.

Use Fastly HTTPS logging to stream CDN request logs directly to Siteline Agent Analytics. This setup is manual: you create the Fastly logging endpoint in your Fastly account and use your Siteline website secret key to identify the incoming traffic. No AWS, S3, EventBridge, Lambda, IAM setup, zip files, CLI scripts, or Fastly API token in Siteline is required.

Prerequisites

  • A Siteline website in Settings > Connected Websites
  • The website secret key for that Siteline website
  • Admin or engineer access to the Fastly service that serves your website
  • Permission to clone, edit, validate, and activate a Fastly service version
Treat the website secret key like a password. Anyone with this key can submit analytics events for that website.

Setup

1

Copy your website secret key

In Siteline, go to Settings > Connected Websites, find the website you want to connect, and copy its Website Secret Key.
2

Open your Fastly service

In the Fastly dashboard, open the service that serves the same website.
3

Clone the active version

Open Service configuration, select the active version, and clone it so you can edit a draft version.
4

Add an HTTPS logging endpoint

In the draft service version, open Logging and add an HTTPS logging endpoint.
5

Enter the Siteline endpoint settings

Use the settings in the table below. Replace YOUR_SITELINE_WEBSITE_KEY with the website secret key you copied from Siteline.
6

Validate and activate

Validate the draft Fastly version. When you are ready for the production service to send logs to Siteline, activate the version.

Fastly HTTPS logging settings

SettingValue
Namesiteline-traffic
URLhttps://api.siteline.ai/v1/intake/fastly
MethodPOST
Content typeapplication/json
Header nameAuthorization
Header valueBearer YOUR_SITELINE_WEBSITE_KEY
Period5
Request max bytes1900000
Log processing regionnone
Log format{"timestamp":"%{begin:%Y-%m-%dT%H:%M:%SZ}t","host":"%{json.escape(req.http.host)}V","url":"%{json.escape(req.url)}V","request_method":"%m","response_status":%s,"time_elapsed_usec":%{time.elapsed.usec}V,"request_user_agent":"%{json.escape(req.http.User-Agent)}V","request_referer":"%{json.escape(req.http.Referer)}V","client_ip":"%h","service_id":"%{req.service_id}V","version":"%{req.vcl.version}V"}
The Fastly HTTPS logging API documents these fields, including header_name, header_value, request_max_bytes, and period: Fastly HTTPS logging reference.

How it works

Fastly sends batches of JSON request records to Siteline:
Fastly HTTPS logging
  -> https://api.siteline.ai/v1/intake/fastly
  -> Siteline analytics pipeline
When you validate the Fastly HTTPS logging endpoint, Siteline automatically answers Fastly’s domain-control challenge for the shared api.siteline.ai endpoint. Siteline reads the Authorization: Bearer <website secret key> header, parses each row, skips malformed rows, and maps valid records to Agent Analytics pageviews for the matching website.

Verify the setup

After you activate the Fastly version, visit your website and wait a short time for Fastly to deliver its next batch. Then refresh Siteline Agent Analytics. You should see the website integration type become Fastly after Siteline receives valid events.

Disconnect

To stop sending Fastly logs to Siteline, remove or disable the siteline-traffic HTTPS logging endpoint in Fastly and activate the updated service version. If the website secret key may have been exposed, regenerate it in Settings > Connected Websites. After regenerating the key, update the Fastly HTTPS logging header value to use the new key.

Troubleshooting

Confirm the URL is https://api.siteline.ai/v1/intake/fastly, the method is POST, and the content type is application/json. Fastly HTTPS logging destinations must use HTTPS.
Confirm the Authorization header value is Bearer YOUR_SITELINE_WEBSITE_KEY, not your Fastly API token. Visit the website after activation and allow time for Fastly’s next log batch.
Check that the Fastly header uses the website secret key for the Siteline website you intended to connect.
Update the Fastly HTTPS logging endpoint header value to use Bearer <new website secret key>, then validate and activate the Fastly version.
Need help? Book a setup call and we’ll walk you through it.