Rankly reads your Fastly traffic through a real-time logging endpoint. You create an HTTPS log endpoint in the Fastly dashboard that posts JSON to Rankly.
Prerequisites. A Fastly service in front of your site, and a verified domain in Rankly. Your ingest token is in Settings.

Setup

1

Create an HTTPS logging endpoint

In the Fastly dashboard, open your service and go to Logging -> Create endpoint -> HTTPS. Configure:
SettingValue
URLhttps://ingest.tryrankly.com/ingest/fastly?tenant=tnt_your_token
MethodPOST
Content typeapplication/json
Formatone JSON object per log line (see below)
2

Set the log format

Use a JSON log line with these fields. Fastly’s format syntax fills them in per request:
{
  "timestamp": "%{strftime(...)}V",
  "client_ip": "%{client.ip}V",
  "host": "%{req.http.host}V",
  "method": "%{req.method}V",
  "url": "%{req.url}V",
  "user_agent": "%{req.http.user-agent}V",
  "status": "%{resp.status}V",
  "referer": "%{req.http.referer}V",
  "country_code": "%{client.geo.country_code}V",
  "bytes": "%{resp.bytes_written}V",
  "req_id": "%{req.xid}V"
}
Rankly accepts one JSON object per line or a JSON array per POST.
3

Activate and test

Activate the new service version, then send a test request:
curl -A "GPTBot/1.0" https://your-domain.com/
Fastly streams logs continuously, so events appear within a minute.
Fastly sends the real client IP and country at the edge, so IP verification and origin mapping work without any origin changes.