← Back

Connect Your Fastly Website to Agent & LLM Analytics

Overview

This integration uses a Fastly logging endpoint to send analytics events to Dark Visitors. Please contact us if you need help.

Step 1: Create a Logging Endpoint

req.http.host == "YOUR_DOMAIN"
{
    "timestamp": "%{strftime(\{"%Y-%m-%dT%H:%M:%S%z"\}, time.start)}V",
    "client_ip": "%{req.http.Fastly-Client-IP}V",
    "host": "%{if(req.http.Fastly-Orig-Host, req.http.Fastly-Orig-Host, req.http.Host)}V",
    "url": "%{json.escape(req.url)}V",
    "request_method": "%{json.escape(req.method)}V",
    "request_referer": "%{json.escape(req.http.referer)}V",
    "request_user_agent": "%{json.escape(req.http.User-Agent)}V",
    "request_signature": "%{json.escape(req.http.Signature)}V",
    "request_signature_input": "%{json.escape(req.http.Signature-Input)}V",
    "request_signature_agent": "%{json.escape(req.http.Signature-Agent)}V"
}
https://api.darkvisitors.com/logs/fastly
text/plain
Authorization
Bearer YOUR_ACCESS_TOKEN

Step 2: Test Your Integration

If your website is correctly connected, you should see visits from the Dark Visitor agent in the realtime timeline within a few seconds.