Skip to content

Quickstart

By the end of this page you’ll have Kilden on your site and you’ll watch your first event arrive live.

Sign in at app.kilden.io and create a project. You land on the onboarding page, which shows your install snippet with the write key already filled in — and a live indicator waiting for your first event.

Copy the snippet from onboarding (or use this one, replacing YOUR_WRITE_KEY) and paste it before </head>:

<script>
!(function (w, d) {
if (w.kilden) return;
function stub(o, names) {
o._q = [];
names.split(' ').forEach(function (m) {
o[m] = function () { o._q.push([m].concat([].slice.call(arguments))); };
});
return o;
}
var k = (w.kilden = stub({}, 'init track identify setPersonProperties reset register unregister getDistinctId getSessionId optOut optIn hasOptedOut setIdentityToken flush use removePlugin startSessionRecording stopSessionRecording getReplayId group isFeatureEnabled getFeatureFlag onFeatureFlags'));
k.flags = stub({}, 'isFeatureEnabled getFeatureFlag getAllFlags onFeatureFlags reload override');
k.messenger = stub({}, 'open close show hide toggle showNewMessage on off update');
var s = d.createElement('script');
s.async = true;
s.src = 'https://cdn.kilden.io/kilden.iife.js';
d.head.appendChild(s);
})(window, document);
kilden.init('YOUR_WRITE_KEY');
</script>

The snippet loads the SDK asynchronously and queues any calls made before it finishes — nothing is lost, and it never blocks your page. Prefer a package? See installing with npm.

Open a page with the snippet installed. Loading the page emits a $pageview automatically — and the onboarding screen flips to “First event received”, then takes you to the live tail: a real-time stream of every event your project receives. Keep it open while you instrument; it’s the fastest feedback loop you have.

kilden.track('signup_completed', { plan: 'pro' });

It appears in the live tail within a couple of seconds, alongside the autocaptured clicks and pageviews.