InstallBrowser snippet

Install via browser snippet

Paste the async snippet into your <head> and the SDK loads automatically. No build step, no npm — works on plain HTML, WordPress, Shopify themes, Webflow, and any static site.

Looking for the React / Next.js / bundler install? See Quickstart. Letting an AI agent (Claude Code / Cursor) do the install? See Install with AI.

What you’ll need

  • Your API key from the dashboard at Settings → API Keys (format st_live_... or st_test_...).
  • Access to your site’s HTML head (theme editor / page template / file editor).

Copy this into your site’s <head> — anywhere before </head> is fine, but earlier is better (more autocaptured pageview/click events captured before users navigate away):

<script>
  !function(){
    if(window.TrackCrumb)return;
    var q=[];
    var st={
      _q:q,
      init:function(){q.push(['init',arguments])},
      track:function(){q.push(['track',arguments])},
      identify:function(){q.push(['identify',arguments])},
      reset:function(){q.push(['reset',arguments])}
    };
    window.TrackCrumb=st;
    var s=document.createElement('script');
    s.async=true;
    s.src='https://docs.iwanttotrysomething.site/sdk/v1/sdk.min.js';
    document.head.appendChild(s);
  }();
  TrackCrumb.init({
    apiKey: 'st_live_REPLACE_ME',
    apiHost: 'https://ingest.iwanttotrysomething.site'
  });
</script>

Replace st_live_REPLACE_ME with your real API key. That’s it — autocapture (pageviews + clicks + form submits) starts immediately. Manual events:

<script>
  TrackCrumb.track('signup_completed', { plan: 'growth' });
  TrackCrumb.identify('user_42', { email: '[email protected]' });
</script>

You can call TrackCrumb.track(...) before the SDK has finished loading — calls are queued and replayed automatically.

Pinned version (production)

The snippet above uses /sdk/v1/sdk.min.js — the latest 0.x release. Patches roll out automatically. For stricter change control, pin to the exact version with a Subresource Integrity (SRI) hash:

<script>
  /* same async stub as above, except: */
  s.src = 'https://docs.iwanttotrysomething.site/sdk/<EXACT-VERSION>/sdk.min.js';
  s.integrity = '<EXACT-SRI-HASH>';
  s.crossOrigin = 'anonymous';
</script>

For SDK 0.3.0:

Value
URLhttps://docs.iwanttotrysomething.site/sdk/0.3.0/sdk.min.js
Integritysha384-4qGJuFY/JoUQP6/vSLtljVJWCH7H+g/Qedeqe9xIPoQmaCpKQaukiCf+4t+Lp+9T

Bumping the SDK requires updating both the URL and the hash in your snippet. The latest values are always at https://docs.iwanttotrysomething.site/sdk/0.3.0/sdk.min.js.sri.

Verify

  1. Open your site in an incognito window with DevTools → Network.
  2. Confirm sdk.min.js loads with status 200 from docs.iwanttotrysomething.site.
  3. Open DevTools → Console: window.TrackCrumb should be an object with init, track, identify, reset, and TrackCrumb properties.
  4. Open the dashboard → Live Events stream → events should appear within seconds.

Platform-specific tips

WordPress

We ship a first-class WordPress plugin that handles snippet install + WP user identification + WooCommerce auto-capture. Use that instead of the manual snippet for any WP site.

Shopify (custom theme)

Open Online Store → Themes → Edit code → theme.liquid. Paste the snippet just above </head>. Save.

Webflow

Project Settings → Custom Code → Head Code. Paste the snippet. Save and publish.

Squarespace / Wix

Both expose a “Custom HTML in head” setting. Paste the snippet, save.

Plain static HTML

Paste the snippet directly into the <head> of every page (or your shared header partial / template).

Strict CSP

If your site uses a Content Security Policy, you’ll need:

  • script-src to allow 'self', 'unsafe-inline' (for the bootstrap stub) OR a nonce/hash covering the inline script, plus https://docs.iwanttotrysomething.site.
  • connect-src to allow https://ingest.iwanttotrysomething.site.

What gets captured automatically

Out of the box, autocapture records:

  • $pageview on every navigation / load.
  • $click on any element clicked, with the full element chain (tag, classes, text, data-attributes, CSS path).
  • $form_submit on form submits.

These events stream to ClickHouse and surface in the dashboard’s Trends, Funnels, and Retention views with no further wiring.

Compatibility

  • All modern evergreen browsers: Chrome, Firefox, Safari, Edge (last 2 major releases).
  • Brotli + gzip pre-compressed bundles are served when supported (47 KB / 70 KB respectively).
  • IE11 and below: not supported.

Next steps

  • Identify your users so events tie to a specific person — see Quickstart §4.
  • Track custom events — see Quickstart §5.
  • Set up funnels and retention — see the User Manual.
  • Privacy + cookie consent — the snippet starts capturing on load. If your jurisdiction requires consent, gate the snippet behind your consent plugin (CookieYes, Complianz, OneTrust). The SDK does not auto-detect consent state.