Documentation
89 pages: installing the tracker, everything it reports, how AI crawlers and AI referrals are counted, and how to self-host. Where a capability is not built yet, the page says so instead of describing it.
<script
defer
data-site="1"
data-host="https://analytics.example.com"
src="https://analytics.example.com/mf.js"
></script>That line counts people. AI crawlers never run it, so they are read from your server log or your edge middleware instead.
Getting started
From an empty site to a first pageview.
- InstallationTwo halves: a script tag for the people, a server log for the machines.
- The script tagEvery data attribute the tracker reads, and what each one turns off.
- The npm package@micaforge/sdk, its framework wrappers, and when to use it instead of the tag.
- Verify it worksThirty seconds to prove the tracker is reporting, and what to check when it is not.
- Nuxt@micaforge/nuxt: the tag, router pageviews, useMicaforge(), useFlag() and Nitro helpers.
- Swift: iOS, macOS and other Apple appsThe Swift SDK: screens, events, identify, revenue and flags from an Apple app.
- The DevTools overlaySee every event the tracker sends, and why it did not send the rest, on your own page.
Guides
One task per page, from start to finish.
- How to track traffic from ChatGPT and other AI assistantsSee how many visitors ChatGPT, Perplexity, Claude and Gemini send you, which pages they land on, and whether they convert.
- How to see which AI crawlers visit your websiteFind GPTBot, ClaudeBot, PerplexityBot and other AI crawlers in your access log, send them to Micaforge, and read what each one fetched.
- How to track AI crawlers on Cloudflare Pages and WorkersReport GPTBot, ClaudeBot and other AI crawler fetches from a Cloudflare Pages middleware or a Worker, with no access log and no npm package.
- How to block AI crawlers with robots.txtWrite robots.txt rules for GPTBot, ClaudeBot, CCBot and other AI crawlers, keep the ones that send you readers, and check that each crawler obeyed.
- How to track UTM campaignsTag links with UTM parameters, file each campaign under the right channel, and compare campaigns by visitors and conversions in Micaforge.
- How to track form submissionsCount signups, contact requests and other form submissions as events and goals, see where people drop out, and never read a field value.
- How to find broken links and 404 pagesRecord every visit that lands on your 404 page, list the missing URLs people and AI crawlers ask for, and redirect the ones that matter.
- How to exclude your own visits from analyticsKeep your own pageviews, your team's office and your staging sites out of Micaforge, with a browser opt-out, an IP deny list and path rules.
- How to add analytics to an Astro siteAdd cookieless Micaforge analytics to an Astro site: one tag in the layout, page changes with view transitions, events, 404s and AI crawlers.
- How to add analytics to a Docusaurus siteAdd cookieless Micaforge analytics to Docusaurus with one entry in docusaurus.config.js, then see which docs people read and which AI crawlers fetch.
- How to add analytics to a GitHub Pages siteAdd cookieless Micaforge analytics to a GitHub Pages site, plain HTML or Jekyll, and learn what GitHub Pages cannot show you about AI crawlers.
Tracking
What the browser reports, and what it does not.
- PageviewsWhat a pageview carries, when it is sent, and how engagement time is measured.
- Custom eventstrack(), event properties, and what belongs in a property rather than a name.
- identify() and setTraits()Attaching your own id to events, recording traits and their history, and the privacy trade you make when you do.
- Outbound and downloadsAutomatic capture of links that leave the site and links that fetch a file.
- Single-page routingHow client-side navigation becomes pageviews, and when to drive it yourself.
- Web VitalsThe five metrics collected, how they are measured, and where they surface.
- Error trackingCapturing uncaught errors and unhandled rejections, what is sent, and how the Errors screen groups them.
- Session replayThe store, the retention and the route exist; the recorder does not.
- Feature flagsRollouts, variants, audiences, prerequisites and environments, decided the same way in the browser, on your server and in Micaforge.
- ExperimentsA/B tests, the two columns they write to, and which install can write them.
- Proxying the scriptServing /mf.js and the ingest endpoint from your own domain.
- Frustration signalsRage clicks, dead clicks and abandoned forms: what each one means, what is sent, and where they appear.
- RevenuePayments from Stripe or Paddle, matched to the visit that led to them, and the checkout reference that makes the match exact.
- Revenue from StripeThe webhook endpoint to create in Stripe, the three events Micaforge reads, and what each one records.
- Sampling and maskingKeeping a share of visitors with data-sample, and hiding identifiers in URLs with data-mask and data-strip-query.
- Click tagsSending a custom event from any element with data-track, without writing JavaScript.
- Revenue from PaddleThe notification destination to create in Paddle Billing, the three events Micaforge reads, and what each one records.
- MCP server analyticsCalls, clients, latency and errors of the MCP servers you run, measured inside the server, with no argument values or messages sent.
- Event scannermicaforge-scan lists every analytics event in your code, checks names and properties, compares them with your site and types track().
AI traffic
AI crawlers and AI referrals: the traffic a script tag cannot see.
- What counts as an agentThree tables, three answers, and why naming a client is not the same as guessing at one.
- Shipping server logsThe log shipper, the framework middlewares, and the signed endpoint they both use.
- Verifying agentsNamed is a claim. Verified is a check against what the operator publishes.
- robots.txt and llms.txtWhat your site said, what the agents did, and the difference between the two.
- The Citation GapFetches per arrival, per URL: how it is computed, what each verdict means, and what it cannot see.
- Content decayPages people stopped reading while the machines did not.
- Vercel log drainsRecord AI crawler traffic on a Vercel site from Vercel's own request log, with no change to the site.
The dashboard
Each screen, and the question it answers.
- Filters and segmentsEvery dimension you can filter on, the operators, and how to save a set of them.
- GoalsFive kinds of conversion, what each one matches, and how value is attached.
- FunnelsOrdered steps, a completion window, and where people leave.
- JourneysWhere a page leads, as a flow rather than a list.
- RetentionCohorts by week or month, and what a cookieless tool can honestly claim about them.
- Custom dashboardsBuilding a screen out of the same reads every other screen uses.
- SharingPublic dashboards, private links, scopes, passwords and expiry.
- The query consoleBuilding a read by hand, and seeing the exact request before it is sent.
- Ask AIQuestions about a site, answered by a model that runs the dashboard's own queries, with every query shown.
- Audit logWho changed what in an organisation, when, and what it was before.
- Uptime monitoringMonitors that check a URL on a schedule, what makes a check fail, and when an incident opens and closes.
- Ingest guardsAllow and deny lists of IP ranges, extra hostnames, blocked counts and a daily email.
- InsightsInvestigations that open when a number moves, check themselves again, and explain the likely cause.
- Status pagesA public, read-only page that shows the state of your monitors, the incidents you post and the maintenance you plan.
- AnnotationsNotes on a site's charts: a moment or a range, a colour and a category, from the dashboard, the API or an agent.
- Short linksShort links with UTM parameters, device targets, preview cards and QR codes, and click counts that never store an address.
The API
Read your own data, or let an agent read it.
- AuthenticationSession cookies for the dashboard, bearer keys for everything else, and a signature for ingest.
- Stats APIOne query envelope, every read endpoint, and the response shape they all share.
- Events APIThe four ingest endpoints, their payloads, their limits and what they answer.
- MCP serverReport, monitoring, revenue and Google Search tools, the AI analyst, and writes for goals, notes, feature flags and short links over JSON-RPC, with an API key or OAuth.
- Rate limitsWhat is limited, by how much, and what a limited request looks like.
- Exporting raw dataEvery recorded event, error and web vital for a site and date range, as a streamed ZIP of CSV or JSON.
- FeedbackReport a bug or ask for a feature from the dashboard, the API, an agent or a chat app, and how admins triage it.
Self-hosting
One machine, five containers, no outbound call.
- Installing the stackOne machine, five containers, about ten minutes.
- ConfigurationEvery variable the server reads, what it defaults to, and what happens when it is unset.
- UpgradingOne script, a dump before anything changes, and a rollback note when it is done.
- BackupsTwo stores, two methods, and the restore drill that ships beside them.
- ScalingWhere the load actually goes, and what to change first.
- TroubleshootingThe faults that actually happen, in the order they happen.
- Google and GitHub sign-inAdd Continue with Google and Continue with GitHub beside the emailed code.
- Billing, for operatorsPlans, quotas, usage emails and Stripe. Off by default, and meant for a hosted service.
Migrating
Bringing history over from another tool.
- From Google AnalyticsImporting GA4 history, and the four numbers that will not match.
- From PlausibleImporting Plausible's CSV exports, and what changes when the two audiences separate.
- From UmamiImporting an Umami event dump, and mapping its vocabulary onto this one.
- From PostHogImporting PostHog events from an export file or straight from PostHog's API, and what maps onto what.
- From Simple AnalyticsImporting Simple Analytics data points from a CSV export or from its export API.
Privacy
What is stored, and what is never stored.
- What we storeEvery column, and the three things that are never written down.
- Cookieless identificationHow a visitor is counted without a cookie, and what that costs you.
- GDPR and consentWhat the product does, what that means for consent, and where our answer stops.
- Data retentionWhat expires, when, and how deletion is actually done.
Integrations
Chat apps that answer questions and post what changed.
- SlackAsk about a site from Slack, get new investigations in a channel, and create the Slack app.
- DiscordAsk about a site with a Discord slash command, get new investigations in a channel, and create the app.
- TelegramAsk about a site from a Telegram chat, get new investigations there, and create the bot with BotFather.
- GitHubPut a site's deploys, releases and pushes on its charts, and open feedback as GitHub issues, with a GitHub App.
- Google Search ConsoleSee what people searched on Google before they arrived: search terms, pages, countries and devices, with clicks, impressions and position.