Bunny
Bunny CDN analytics through Log Forwarding. Fill in one form in the bunny.net panel and every page request is counted, including cache hits.
Bunny sends its access log to MetrikStack through Log Forwarding as requests happen, so every request is seen, including cache hits. You don't add a script or edge code; you fill in one form in the bunny.net panel.
Set up Log Forwarding
- In the MetrikStack dashboard, add a source of kind Bunny edge to your site and copy its ingest token.
- In bunny.net, open your Pull Zone, go to Logging and turn on Log Forwarding.
- Fill in the form:
| Field | Value |
|---|---|
| Hostname | logs.metrikstack.com |
| Port | 6514 |
| Protocol | TCP encrypted |
| Token | the ingest token of your source |
| Format | Plain text |
- Save. Bunny forwards with a delay of up to half a minute, so the first pageviews appear in the dashboard within about a minute of the next visit.
The token is what ties the log lines to your site. Treat it like a password: anyone who has it can send pageviews to your site. If it leaks, rotate it in the dashboard and update the form.
Protocol
Only TCP encrypted works. Log lines contain visitor IP addresses, so
MetrikStack doesn't accept UDP or plain TCP, and with either of those
nothing arrives.
Format
Use Plain text. JSON is accepted as well, but plain text is the format
Bunny documents and the one we test against.
What counts
Only GET and HEAD requests for pages become pageviews. Assets (scripts,
styles, images, fonts and the like), redirects and lines that cannot be read
are skipped. A page answered with 304 counts: that is a returning visitor
whose browser checked whether its copy of the page is still current. Bots, AI assistants and AI crawlers are
classified and kept apart from people, as with every other
source.
Background requests a framework makes for a page are skipped too: the data fetches of Next.js (link prefetching and in-app navigation) and Remix are not pageviews.
Single-page apps
A log only contains what reaches the CDN. On a site that navigates in the browser without loading a new document (Next.js, Remix, Nuxt and similar), Bunny sees the first page of a visit and not the pages after it. Visitors and entry pages are accurate; pageviews per visit come out low. Add the browser script next to the Bunny source to count in-app navigation as well. A pageview seen by both is merged and counted once.
Bunny's IP anonymization
Bunny anonymizes IP addresses in its logs by default. You can leave that on.
On a site with a Bunny source, MetrikStack identifies visitors from every source of that site (the browser script too) by the same anonymized part of the address: the first three parts of an IPv4 address, the first half of an IPv6 address. That way the script and Bunny recognise the same visitor, and a view seen by both is counted once.
| Bunny setting | Effect in MetrikStack |
|---|---|
| Remove last octet (Bunny's default) | Recommended. Country and region stay accurate, city is slightly less precise. Visitors who share a network and use the identical browser can be counted as one, so unique visitors come out marginally low. Pageviews are unaffected. |
| Full IP addresses | Works the same: MetrikStack still uses only the anonymized part to identify visitors, so the script and Bunny match. Locations get a little more precise. Bunny only offers this after you sign its Data Processing Agreement. |
| Drop all | Not recommended. Every visitor with the same browser looks identical, so unique visitors and sessions collapse, and the script and Bunny can no longer be matched. Pageviews and the country (which Bunny reports separately) still work. |
Whichever you choose, MetrikStack uses the address only to derive the location and the daily visitor hash, and discards it within milliseconds. It is never stored and never written to a log. See Privacy & data retention.
Troubleshooting
- Nothing arrives. Check the protocol is
TCP encryptedand the port is6514, that the token has no spaces around it, and that the source is active in the dashboard. - Fewer pageviews than expected. Assets, redirects and bots are not pageviews. Compare with Bunny's request count for HTML pages only.
- Combining with the browser script. That works, and pageviews seen by both are counted once. See How merging works.
If you would rather receive Bunny's syslog yourself (for buffering, or to send the log to more than one place), see the relay setup in Access logs.
Cloudflare
Cloudflare web analytics that count cache hits and bots. Install the MetrikStack Worker on your zone in one step with a scoped API token.
Access logs
Server-side analytics from your nginx, Caddy or Traefik access logs. Ship them to MetrikStack with Vector or Fluent Bit, without changing your app.