info
Right now, Botmon is in early access. We are onboarding a small group of early users and prioritising teams who want to understand AI and bot traffic deeply.
Installing the Botmon SDK
Botmon helps you monitor and analyze AI bot traffic on your website.
Getting an API Key
Create an API key here and keep this on hand. We will be using this to initialise the SDK. Remember, this key is considered a secret so handle it appropriately and never check it into source code.
Installing the Botmon SDK on your CDN Edge
- Get the Botmon SDK on
npmhere. - Initialise the SDK and deploy your worker accordingly. See examples below:
- Cloudflare Workers
Install Botmon SDK from npm
npm install @botmonio/sdk
your/cloudflare/worker.js
import { BotMon } from "@botmonio/sdk";
export default {
async fetch(request, env, ctx) {
// Initialize SDK
const botmonsdk = BotMon.init({
apiKey: env.BOTMON_API_KEY,
});
// Handle the request
// - this just passes the request through to the origin
const response = await handleRequest(request);
// Track the request (non-blocking)
botmonsdk.track(ctx, { request, response });
return response;
},
};
Verify that Traffic is being Captured
Verify that traffic is being captured by the Botmon SDK on the Botmon Dashboard.