Developer Documentation
Integrate AIMirror into your product with a single line of code. The SDK automatically analyzes user behavior, accessibility patterns, and UI friction β without cookies or manual tagging.
π Quick Install
The fastest way to get started:
<script src="https://cdn.aimirror.dev/aimirror.latest.js" data-key="YOUR_PUBLIC_API_KEY"></script> That's it β the SDK initializes automatically and begins collecting non-sensitive interaction signals. No configuration, no cookies, and no personal data collection.
π Event Model (What AIMirror Collects)
AIMirror does not record keystrokes, form input values, or personal identifiers. Only behavioral and structural interaction signals are collected.
| Event | Description |
|---|---|
click | Element clicks + metadata (position, element shape, etc.) |
scroll | Scroll depth, direction, and momentum frames |
hover | Hover start/end + total hover duration per element |
input_change | Tracks that a field changed (never records values) |
pointer_stop | Micro-hesitation signal (stopped cursor) |
scroll_velocity | Velocity changes (detects friction & reading patterns) |
dom_mutation_batch | Significant DOM updates (modals, layout shifts, errors) |
touch_gesture | Mobile pinch/zoom/swipe intent |
funnel PRO | Your own journey metadata (e.g. "signup_start") β paid feature |
π― Funnel Tracking PRO
Funnel tracking is available on paid plans and allows you to mark key journey moments such as onboarding steps, checkout progress, or custom intent signals.
You can trigger a funnel event anywhere in your application using the global SDK object:
window.AIMirror.funnel("signup_start");
Include optional metadata:
window.AIMirror.funnel("checkout_payment", {
method: "credit_card",
plan: "pro_monthly"
});
Funnel events are processed by AIMirrorβs AI engine and enhance conversion, friction, and journey-dropoff analysis in your dashboard.
π§© Session Model
AIMirror session IDs are anonymous, cookie-free, and rotate automatically when the tab is closed or inactive for ~30 minutes.
{
"sessionId": "5dd71c23-9c51-4d2e-8a4a-9a322e2ab1b9",
"projectId": "your-project",
"events": [...],
"startTime": 1712010218412,
"endTime": 1712010225532
} All events stay inside your own project boundary β no cross-site tracking, no cookies, and no fingerprinting.
π§ AI Insight Objects
After processing user sessions, AIMirror delivers structured insight objects to your dashboard and API:
{
"section": "pricing_page",
"category": "engagement",
"observation": "Users repeatedly hover over features but rarely click",
"suggestion": "Increase clarity around plan differences",
"confidence": 0.86,
"impact": "medium",
"details": {
"example": null,
"evidence": {
"clicks": 4,
"scrolls": 12,
"hovers": 28,
"avgHoverMs": 742
}
}
}β FAQ
Is AIMirror GDPR compliant?
Yes β AIMirror processes only anonymized behavioral data.
Does it use cookies?
No. Sessions are cookie-free and device-agnostic.
Does AIMirror collect text, inputs, or keystrokes?
Never. Only interaction signals, not content.
Can I export my insights?
Yes β JSON/CSV downloads and an API endpoint are available.