One tag to install. Everything else is optional.
A site needs one script tag. Past that, you can name your own events from the page, send events from your server, read every number back through a REST API, or give the lot to an agent.
The install tag
Add this to the head of every page you want counted. The Settings page in Pulse shows the exact tag for a site, with its id and the address the script is served from.
- The script is about 6.8 KB, 2.5 KB gzipped, and Pulse serves it compressed with a day's cache.
- It does nothing without data-site-id.
- A single-page app is followed through history changes, so each route counts as a pageview.
<script defer src="https://tracker.example/api/v1/collect/p.js" data-site-id="SITE-ID"></script>
Data attributes
| data-site-id | Required. The site's id. |
|---|---|
| data-do-not-track | Set to true to send nothing from a browser with Do Not Track on. |
| data-pulse-auto-events | off, or a comma-separated list of outbound, downloads, errors, and forms. Left out, all four run. |
| data-pulse-event and data-pulse-props | On any element: a click on it sends the named event, with the JSON in the second attribute as its properties. |
| data-pulse-no-track | On any element: clicks and form submissions inside it are not tracked. |
| data-pulse-test and data-pulse-test-convert | An element that takes the visitor's A/B variant, and one whose click counts as a conversion. |
The pulse object
The script adds window.pulse. In a browser under automation it exists with empty versions of the same functions, so your code never has to check.
pulse.track("demo_requested", { product: "VXM-6 Mammoth" });
pulse.identify("user-4821"); // opt in, for signed-in areas only
pulse.reset(); // forget the id again
pulse.testView("TEST-ID", function (variant) { /* show the variant */ });
pulse.testConvert("TEST-ID");
Events from a server
A server can send events with an API key, one at a time or in a batch, for things the browser never sees, such as a payment that cleared.
POST /api/v1/events
Authorization: Bearer API-KEY
{ "site_id": "SITE-ID", "name": "purchase", "revenue": 4800.0, "currency": "USD" }
Webhooks from Stripe, SendGrid, Google Ads, and Meta post to their own addresses under /api/v1/webhooks and are checked against a signature.
Reading the numbers
Everything the dashboard shows comes from a REST API under /api/v1, and a good deal more.
| Stats and breakdowns | stats, timeseries, pages, entry and exit pages, sources, campaigns, keywords, countries, regions, cities, devices, browsers, operating systems, screens, languages, events, visitor types, and web vitals. |
|---|---|
| Filters and comparison | filter.<dimension> on every stats endpoint, with is, is not, contains, does not contain, and matches; compare=previous_period or previous_year adds a comparison block. |
| Retention and attribution | Cohort retention over identified users, and five attribution models. |
| Goals, funnels, tests, reports | Create, list, read, and delete each, with conversions, funnel results, test results, and CSV export. |
| Public pages | Four read-only endpoints (stats, timeseries, pages, sources) behind a public link. |
Agent tools
Pulse ships an MCP server with 62 tools, relayed through the fleet's Roost. An agent can create a site and read its install tag, pull any breakdown, add a goal or a funnel, start and conclude an A/B test, save a report, and check the service's health and diagnostics. The home page lists them by group.
- Reads and writes go through the same API the dashboard uses, so access follows the same rules.
- The tools cover most of the API surface above; retention, period comparison, and the public pages are API only.
Questions about this tool?
Write to Renkara Media Group and a person will answer.