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.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.
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
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.
Clone the active version
Open Service configuration, select the active version, and clone it so you can edit a draft version.
Add an HTTPS logging endpoint
In the draft service version, open Logging and add an HTTPS logging endpoint.
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.Fastly HTTPS logging settings
| Setting | Value |
|---|---|
| Name | siteline-traffic |
| URL | https://api.siteline.ai/v1/intake/fastly |
| Method | POST |
| Content type | application/json |
| Header name | Authorization |
| Header value | Bearer YOUR_SITELINE_WEBSITE_KEY |
| Period | 5 |
| Request max bytes | 1900000 |
| Log processing region | none |
| 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"} |
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: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 thesiteline-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
Fastly validation fails
Fastly validation fails
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.No traffic appears in Siteline
No traffic appears in Siteline
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.Events are attached to the wrong website
Events are attached to the wrong website
Check that the Fastly header uses the website secret key for the Siteline website you intended to connect.
You regenerated the website secret key
You regenerated the website secret key
Update the Fastly HTTPS logging endpoint header value to use
Bearer <new website secret key>, then validate and activate the Fastly version.