MetrikStack
Sources

Netlify

Netlify analytics without a script. Send your site's traffic logs to MetrikStack with a Netlify log drain and count every page request, bots included.

Netlify Log Drains stream a site's traffic logs to an HTTP endpoint in near real time. Point one at POST /v1/logs/netlify and every page request Netlify served becomes a pageview, without a script on the page or any change to your site.

Log drains are a paid Netlify feature (Enterprise, or the Netlify Analytics / Log Drains add-on, depending on your plan).

Create a source of kind logs for the site in the dashboard to get an ingest token (in_…).

Set up the drain

  1. Netlify → your site → Site configuration → Log drains → Add log drain.
  2. Service: General HTTP endpoint.
  3. Log type: Traffic. (Function and edge-function logs may share the same drain; they are skipped server-side.)
  4. Endpoint URL: https://api.metrikstack.com/v1/logs/netlify
  5. Format: JSON or NDJSON; both are accepted.
  6. Authorization header: Bearer in_…

Netlify's UI also allows API keys as query parameters, and every /v1/logs/* endpoint accepts the ingest token that way:

https://api.metrikstack.com/v1/logs/netlify?token=in_...

Use the Authorization field when you can. A token in a URL is visible to anyone who can read the site's settings, and ends up in logs more easily.

What becomes a pageview

An entry counts when all of the following hold:

  • it is a traffic log (log_type is traffic or absent);
  • the method is GET or HEAD;
  • the path is not an asset path (same extension and prefix rules as every other source; see Access logs);
  • the status is not a 3xx redirect. A 304 counts: the browser checked whether the copy of the page it kept from an earlier visit is still current.

Everything else is counted in the response's skipped figure, not rejected.

Fields map like this:

NetlifyMetrikStack
path (or the path of url)path + query
urlhostname
methodmethod
status_codestatus_code
user_agentuser agent (bot classification, device, browser)
referrerreferrer
client_ipvisitor hash + GeoIP country, then dropped
countrycountry, when GeoIP has nothing
request_id (or x-nf-request-id)request_id
timestamp (RFC 3339)event timestamp

If you turn on Netlify's option to exclude PII, user_agent and client_ip are left out of the logs. Pageviews still arrive, but visitors can no longer be told apart and device, browser and country reports stay empty, so leave the option off if you want visitor counts. MetrikStack never stores the IP itself (see Privacy & data retention).

Drains and the request-id merge

Netlify's request_id is the platform's own id, unrelated to the X-MetrikStack-Request-Id that the Node SDK sets, and a drain entry carries none of your application's response headers, so the two cannot be matched. Run the drain as the site's only source and every page request in the traffic log is a pageview. Run it next to the tracker script and merging falls back to the 60-second dedupe window on (site, visitor, path).

The drain sees cached and bot traffic, which never reaches a browser script; the script sees screen size, language and time on page. Running both works well, but pageviews are matched by the dedupe window and not by request id.

Response

{ "accepted": 42, "skipped": 118, "rejected": [] }

On this page