Documentation
Everything you need to integrate and configure StatOn on your website.
Getting Started
Add wm.js once before the closing tag </body> and start collecting analytics in minutes.
Installation
Sign up for a free account at StatOn
Copy your unique tracking script from the dashboard
Paste the script before the closing tag </body> on your website
Analytics data will appear in your dashboard within seconds
Tracking Script
The tracking script loads with defer, uses your site key, and is designed for low runtime overhead. Validate production behavior with your own performance checks.
<script defer src="https://web.staton.app/wm.js"
data-site-key="YOUR_SITE_KEY"></script>
Consent API
If you use a cookie banner or CMP, connect it to StatOn by calling StatOn.setConsent(...) after the visitor makes a choice.
window.StatOn?.setConsent({ analytics: true, personal: false });
window.StatOn?.setConsent({ analytics: true, personal: true });
window.StatOn?.setConsent({ analytics: false, personal: false });
Notes
Call setConsent(...) only after user action in your banner or CMP.
In Balanced mode, anonymous analytics can run before consent. In Strict EU mode, tracking starts only after analytics consent.
If the visitor changes their choice later, call setConsent(...) again with the new values.
Events API
Send custom event hits with the StatOn client API and classify them in the site settings.
window.StatOn?.trackEvent({
type: "EVENT_ID"
});
Parameters
type — event type or event ID from the site settings
Event type and goal classification are managed in the site settings.
How to Use Events
Use events to record important visitor actions such as clicks, signups, form submissions, demo requests, or checkout milestones.
1. Choose the action
Pick a real user action worth measuring, such as a signup click, contact form submit, demo request, or checkout start.
2. Name it clearly
Use a stable type or event ID from the site settings so the event matches the definition configured in the panel.
3. Decide if it is a conversion
Choose in the site settings whether this event should stay regular or be treated as a goal.
When to use an event
- Track a meaningful user action that is not obvious from pageviews alone.
- Use conversions for the actions your team treats as a goal.
- Use regular events for supporting interactions and micro-steps.
Where events appear
- In the visitor log and visitor details.
- In dashboard summaries and top-events widgets.
- In reports when your plan includes reports.
window.StatOn?.trackEvent({
type: "EVENT_ID"
});
window.StatOn?.trackEvent({
type: "EVENT_ID"
});
Example: button click
Send an event when a visitor clicks an important CTA button.
button.addEventListener("click", () => {
window.StatOn?.trackEvent({
type: "EVENT_ID"
});
});
Example: HTML attribute
Use data attributes when you want to mark an element without writing extra JavaScript. Pass the event ID from the site settings in the attribute.
<button
data-staton-event="EVENT_ID"
>
Request demo
</button>
<button
data-staton-conversion="EVENT_ID"
>
Sign up
</button>
Recommended workflow
Choose a stable type value such as signup, form_submit, demo_request, or checkout_start.
Reuse the event type or event ID from the site settings so data collection matches the definition created in the panel.
Set the event goal type in the site settings if you want it treated as a conversion or micro-conversion in summaries and reports.
Define your event types in the Events settings so the product can label and organize them consistently.
Create the event definition first in the site settings and then reuse that type or ID in code and markup.
For data-staton-event and data-staton-conversion, use the event ID generated in the site settings, not the display name.
Privacy Modes
StatOn supports three public privacy modes. You can switch between them at any time from your dashboard settings.
Cookieless — no cookies, no IP tracking, and a simpler consent setup depending on your legal obligations.
Balanced — cookieless by default, enhanced data after visitor consent.
Strict EU — no analytics collection until explicit consent.
Product Areas
After installation, StatOn gives you a few core areas to work with depending on your plan and site configuration.
- Dashboard for live traffic, top pages, sources, and quick overview metrics
- Visitor log with landing pages, devices, countries, engagement, and event history
- Custom events and conversion tracking through the StatOn client API
- Reports, funnels, and retention views when reports are enabled for your plan
- Multi-site management, site-level tracking settings, and explicit support access controls
Configuration
All settings are available in your dashboard under Settings → Tracking. You can configure:
- Privacy mode selection
- Consent banner / CMP wiring via StatOn.setConsent(...)
- Personal-data tracking toggles for IP, User-Agent, and geolocation
- Tracking toggles for UTM, referrer, scroll depth, active time, rage clicks, technical, and performance data
- Interest paths, custom event definitions, and the server event key
- Support access, data retention, and site-level collection settings
Tracking Options
The site tracking configuration controls what the snippet collects and which data types are allowed for a site.
Traffic and attribution
- UTM tags and source attribution
- Referrer tracking
- Custom events and conversion events
Engagement and diagnostics
- Scroll depth
- Active time on page
- Rage clicks
- Technical data and performance data
Personal-data toggles
- IP address collection
- User-Agent collection
- Geolocation collection
Site-level extras
- Server event key for trusted event ingestion
- Interest paths for report funnels
- Data retention period and collection on/off
Reports and Funnel Settings
When reports are enabled for your plan, you can use additional reporting tools beyond the live dashboard and visitor log.
- Traffic, source, conversion, and retention views are available inside Reports when the plan includes them
- Interest paths define which page prefixes count as the “Interest” step in funnel-style report views
- Report segments and report suggestions help organize saved reporting filters
- Reports can currently be exported as PDF from the app
Support Access
Support access is disabled by default. The site owner can grant it temporarily from the site settings when troubleshooting is needed.
- Only the site owner can grant or revoke support access.
- Granting and revoking access are explicit actions and require confirmation in the product.
- Use support access only when your team needs help investigating a specific site issue.
Data Export
Reports can currently be exported as PDF from the app. Additional export formats are not currently announced.
Need Help?
If you have questions or need assistance, reach out to our support team.
Contact Support