Install the Arbling connector
The connector runs where your site is hosted. It counts the visitors, crawlers and AI agents that reach your pages, including the ones the tracking code can't see.
What it does
- It sends Arbling the AI crawlers and AI agents it sees, and counts your visitors.
- It only observes and reports. It never blocks a request, never delays a response and never throws into your code.
- Visitor counts carry no personal data: no IP address, no user agent, and no path beyond its kind.
- Without a connector key it does nothing.
1. Create a connector key
- In the Arbling cabinet, open Settings → Tracking code.
- Under The server-side connector, choose where your site runs, then select Create key.
- The cabinet shows the key once. Save it where your site runs, as
ARBLING_CONNECTOR_KEY.
- Don't paste it into a chat, and don't commit it to your repository.
- To stop the connector, select Revoke beside the key. It stops reporting right away.
2. Next.js, Vercel or Netlify
Install the package from npm. It has no dependencies:
npm install @arbling/edge-connector@2.0.2Then record each request in your middleware or edge function:
import { createEdgeConnector } from '@arbling/edge-connector'
const connector = createEdgeConnector({
endpoint: 'https://api.arbling.com/api/ati/v1/crawl-events',
connectorKey: process.env.ARBLING_CONNECTOR_KEY, // your Arbling connector key
surface: 'site',
})
export function middleware(req, event) {
const { flush } = connector.record({
method: req.method,
pathname: req.nextUrl.pathname,
search: req.nextUrl.search,
userAgent: req.headers.get('user-agent'),
referer: req.headers.get('referer'),
secFetchDest: req.headers.get('sec-fetch-dest'),
accept: req.headers.get('accept'),
clientIp: (req.headers.get('x-forwarded-for') ?? '').split(',')[0].trim() || null,
})
event.waitUntil(Promise.all([flush, connector.flush()]))
}Each send rides waitUntil, never the response.
These steps were checked against version 2.0.2 of the package on npm.
2. A server with an access log
Where you can't run code in front of your site, the package's log shipper reads your server's access log, in nginx or Apache combined format. Run it where ARBLING_CONNECTOR_KEY is set:
npx -p @arbling/edge-connector@2.0.2 arbling-log-shipper /var/log/nginx/access.log- Without the key, it stops and sends nothing.
- Visitors are sent as counts only, so their IP address, user agent and path never leave your server. No raw log line is sent.
- A page your CDN serves from its cache never reaches your server's log. Where you can run the connector at the edge, run it there.
Updating from 2.0.1
After this update your AI crawler count may go down. Five bots were counted as AI crawlers before and no longer are: facebookexternalhit, imagesiftbot, poseidon-research-crawler, semrushbot-ocob and yak.
One bot moves the other way: Meta's meta-webindexer was counted as an AI agent visit and is now counted as an AI crawler.
19 more known bots, such as Yandex, Baidu, Slack and UptimeRobot, are now recognised, so they are never counted as visitors.
2. WordPress or WooCommerce
- In WordPress, open Plugins → Add New, search for Arbling Beacon, then install and activate it.
- Open Settings → Arbling Beacon and paste the key into Crawler reporting key. Save.
Cloudflare
The connector also runs as a Cloudflare Worker. Download the Worker (ZIP). Write to hi@arbling.com if you want help setting it up.
SHA-256 of the file: d5aab765173d11f90d6ea9167487e167611ccd57baae7d7982e55d246a596d1b
