Sublim Analytics developer docs
Everything you need to install the Sublim Analytics tracker on a website, send your own events and purchases, and understand what is measured automatically.
The tracker is a small JavaScript library. Load it once per page, either from our CDN with a script tag or from npm. It records pageviews, engagement, form leads, downloads and e-commerce on its own. You call it only for events that are specific to your product, such as a sign-up, a booking or a cancelled appointment.
It is cookieless. No cookie is set, no IP address is stored, and personal data is filtered out before anything leaves the browser.
Add the script tag, check that data arrives, and send your first custom event.
Install with npm@sublim_analytics/tracker for apps that bundle their dependencies: React, Next.js, Vue…
Send a custom event with properties and, optionally, a revenue amount.
Automatic trackingWhat the tracker measures with no code at all, and how to switch each part off.
MCP serverConnect Claude, ChatGPT, Cursor or Claude Code to your Sublim data, read-only.
Server APISend data from your back end with a secret key, starting with transactional emails.
Events HTTP APIThe ingestion endpoint: request format, fields and responses.
How it works
- The snippet defines
window.sublimand loadsloader.jsfromcdn.sublimanalytics.com. - The loader injects the current versioned bundle (
sublim.<hash>.min.js). The snippet never changes when we ship a new version. - The bundle starts tracking with the options in
sublim.o. It sends a pageview, then events as they happen, totracker.sublimanalytics.com. - Your code calls
sublim.trackEvent(),sublim.trackPurchase()… for anything specific to your site.
<script>
(function(){
window.sublim=window.sublim||function(){(sublim.q=sublim.q||[]).push(arguments)};
sublim.o={projectId:'YOUR_PROJECT_ID'};
var d=document,s=d.createElement('script');
s.src='https://cdn.sublimanalytics.com/loader.js';s.async=1;
d.getElementsByTagName('head')[0].appendChild(s);
})();
</script>
You will find your project ID in the Sublim dashboard, under Settings → Installation. The snippet shown there is already filled in.
Where to go next
- New to Sublim? Start with the Quickstart.
- Building with a framework? See Frameworks & CMS.
- Need every option? See the Configuration reference.
- Something not showing up? Check Troubleshooting.