Anonymetrics

DOCS + API

From zero to signal
in two minutes.

A small integration, cookieless by default, and an API that behaves predictably.

GETTING STARTED

Quickstart

marketing.docQuickstartTexto

Code
<script defer
  data-key="YOUR_PIXEL_KEY"
  src="https://v2.anonymetrics.io/anx2.js"></script>

Script attributes

  • data-key required — your site's pixel key.
  • data-endpoint optional — ingest endpoint. Defaults to https://v2.anonymetrics.io.

The pixel honours Do Not Track on its own: if the visitor has it on, nothing is recorded.

Check the install

Open your site, then the Real time section in the panel: the first event shows up within seconds. If it doesn't, check that data-key is right and that the visitor isn't sending Do Not Track.

Custom events

On top of automatic page views, you can record events through the global window.anx2 API:

Code
// A custom event with optional properties
window.anx2('event', 'signup', { plan: 'pro' });

// Record a manual pageview (SPAs that don't change URL)
window.anx2.pageview();

Properties are optional and become available for segmenting in the panel and through the API.

Goals

Under Behaviour → Goals you define conversions that match either the exact name of an event (say signup) or a path reached (say /thanks). Anonymetrics works out the conversion rate for the period on its own.

Consent and privacy

Measurement is cookieless by default: identity is a daily rotating hash (site + IP + agent) that cannot be linked across days, and the IP is never stored. On most sites you don't need a banner for our analytics.

If your site has a consent banner and you want to recognise returning visitors (our own anx_vid cookie), signal consent like this:

Code
// Before loading the pixel, or any time after consent:
window.anonymetrics_consent = true; // 'granted' works too
Prefer the API, or an AI assistant?

Query your metrics over REST, or connect the MCP server to Claude or ChatGPT.

See API and MCP