Get started in 5 minutes
Metrone only supports first-party integration methods. Every method serves the tracking script from your own domain — your data stays on your infrastructure, no third-party requests leave the browser.
Why we don't offer a third-party script
Your analytics is about your visitors on your site. It belongs on your domain. When analytics runs as a third-party script from a vendor URL, it introduces unnecessary external requests, raises privacy concerns, and creates a dependency you don't control. Metrone runs from your domain — because that's where it should be.
CNAME setup
RecommendedOne DNS record. One script tag. Works with any website.
Add a DNS record
Go to your domain's DNS settings and add a CNAME record:
This creates analytics.yoursite.com — your first-party analytics endpoint.
Add the script tag
Add this to your website's <head>:
<script defer src="https://analytics.yoursite.com/m.js" data-api="https://analytics.yoursite.com/api/event"> </script>
That's it. Page views are tracked automatically. Data appears in your dashboard within seconds.
NPM package
For React, Vue, Next.js, Nuxt, SvelteKit, or any JavaScript app.
Install
npm install @metrone/sdk
Initialize
import { Metrone } from '@metrone/sdk'
const metrone = new Metrone('mk_live_YOUR_API_KEY')
// Automatic page view tracking
metrone.start()
// Track custom events
metrone.track('signup', { plan: 'growth', source: 'landing' })The SDK is bundled into your app — no external requests, no third-party domains.
Edge function proxy
AdvancedFor teams on Cloudflare Workers, Vercel Edge, or Netlify Edge. Proxy analytics through your own infrastructure.
// Cloudflare Worker example
export default {
async fetch(request) {
const url = new URL(request.url)
if (url.pathname === '/m.js')
return fetch('https://proxy.metrone.io/m.js')
if (url.pathname === '/api/event')
return fetch('https://api.metrone.io/v1/events', {
method: 'POST',
headers: request.headers,
body: request.body,
})
return fetch(request)
},
}Then add the script pointing to your domain:
<script defer src="https://yoursite.com/m.js" data-api="https://yoursite.com/api/event"></script>
Track custom events
Track anything — signups, purchases, button clicks, form submissions.
// JavaScript SDK
metrone.track('purchase', {
plan: 'growth',
value: 69,
currency: 'USD'
})Or use the REST API directly from any backend:
curl -X POST https://api.metrone.io/v1/events \
-H "Content-Type: application/json" \
-d '{
"api_key": "mk_live_YOUR_API_KEY",
"event_type": "purchase",
"source": "web",
"page_url": "https://yoursite.com/checkout",
"properties": { "plan": "growth", "value": 69 }
}'Track AI features
Paste a webhook URL into your AI platform — zero code required.
In your Metrone dashboard, go to Integrations to get your webhook URL:
https://api.metrone.io/v1/webhooks/twilio?key=mk_live_YOUR_API_KEY https://api.metrone.io/v1/webhooks/vapi?key=mk_live_YOUR_API_KEY https://api.metrone.io/v1/webhooks/retell?key=mk_live_YOUR_API_KEY
Paste the URL into your platform's webhook settings. Voice calls, chat sessions, and assistant queries appear in your dashboard automatically.
Or send AI events directly via the REST API:
curl -X POST https://api.metrone.io/v1/events \
-H "Content-Type: application/json" \
-d '{
"api_key": "mk_live_YOUR_API_KEY",
"event_type": "ai_call",
"source": "voice",
"ai_provider": "vapi",
"ai_call_id": "call_abc123",
"ai_intent": "book_appointment",
"ai_duration_sec": 47
}'Supported platforms
Twilio
Voice & SMS
VAPI
Voice AI agents
Retell
Voice AI agents
Bland
Voice AI agents
OpenAI
Chat & assistants
Anthropic
Chat & assistants
Any platform with outgoing webhooks works with Metrone. Contact us if you need help with a specific integration.