SublimDocs

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.

How it works

  1. The snippet defines window.sublim and loads loader.js from cdn.sublimanalytics.com.
  2. The loader injects the current versioned bundle (sublim.<hash>.min.js). The snippet never changes when we ship a new version.
  3. The bundle starts tracking with the options in sublim.o. It sends a pageview, then events as they happen, to tracker.sublimanalytics.com.
  4. Your code calls sublim.trackEvent(), sublim.trackPurchase()… for anything specific to your site.
HTML
<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