Quickstart
Two things determine which snippet you need: your Site ID, and your platform.
1. Get a Site ID
In the Mitr dashboard: Integration Hub β Add New App, choose your platform, and enter your domain (for a website) or bundle/package ID (for an app). You'll get a Site ID immediately β and, for non-web platforms, a Secret Key as well.
No account yet? Create one free β 10,000 events a month, no credit card.
2. Drop in the snippet
Website β no build step
Paste this once, right before </head> or </body>:
<script src="https://mitranalytics.dev/vendor/mitr.js"
data-site-id="YOUR_SITE_ID"
async defer></script> That's it β page views (including client-side route changes) are auto-tracked. Full reference: JavaScript SDK.
No-code platforms
WordPress, Shopify, Webflow, Squarespace, Wix β paste the exact same script tag into your platform's "Custom Code" / "Header Scripts" / "Tracking Code" section. Every major site builder has one.
Flutter app (iOS / Android / desktop / Flutter Web)
await MitrAnalytics.instance.initialize( siteId: 'YOUR_SITE_ID', secretKey: 'YOUR_SECRET_KEY', );
Called once, as early as possible (e.g. the top of main()).
Full reference: Flutter SDK.
React Native app
import { MitrAnalytics } from '@mitr/react-native';
export const mitr = new MitrAnalytics({
siteId: 'YOUR_SITE_ID',
secretKey: 'YOUR_SECRET_KEY',
}); Full reference: React Native SDK.
Native Swift app (iOS/macOS)
let mitr = MitrAnalytics(options: .init(
siteId: "YOUR_SITE_ID",
secretKey: "YOUR_SECRET_KEY"
)) Full reference: Swift SDK.
Native Kotlin app (Android)
val mitr = MitrAnalytics(context, MitrAnalyticsOptions(
siteId = "YOUR_SITE_ID",
secretKey = "YOUR_SECRET_KEY",
)) Full reference: Kotlin SDK.
Node.js backend
import { MitrAnalytics } from '@mitr/node';
const mitr = new MitrAnalytics({ siteId: 'YOUR_SITE_ID', secretKey: 'YOUR_SECRET_KEY' });
await mitr.track('signup_completed', { userId: 'user_42' });
await mitr.close(); // before your process exits Full reference: Node.js SDK.
Email / no-JS page
<img src="https://api.mitranalytics.dev/api/v1/p.gif?sid=YOUR_SITE_ID&t=email_open"
width="1" height="1" alt="" style="display:none" /> Full reference: Tracking Pixel.
3. Verify it worked
In the Mitr dashboard's Integration Hub, open the app's card and check connection status β it flips from "Pending" to "Connected" within a few seconds of the first event.