Skip to main content
Use the Outlit Browser SDK script to capture the first visit and send a product event from your site. You need a public tracking key from Settings → Website Visitors in the Outlit app and an enabled domain for the site where you test. If your workspace is still being set up, start with Connect your data.

Add the tracker

Place this tag before the closing </body> tag and replace the example key. The public key is designed to appear in browser code; the enabled-domain list controls which sites can send events with it.
Pageviews and form submissions are tracked automatically. Pageview events include the landing URL, browser referrer, and available UTM parameters, preserving how a visitor arrived before they identify. Because the script loads asynchronously, use this helper for the calls below. Put it after the script tag; it waits for the script when needed.
The default data-auto-track behavior already keeps tracking off in regions that require opt-in consent (EEA, UK, Switzerland, or unknown). To wait for enableTracking() instead — unless a previous opt-in is stored — set data-auto-track="false" on the tag and call window.outlit.enableTracking() only after the visitor accepts. A saved opt-out persists across visits until tracking is enabled again. See Consent management for the complete pattern.

Identify a visitor

After someone signs in or gives you their email, identify the same browser visitor with that email to link earlier website activity to a known contact. Include userId when your app has one; a call without either an email or userId has no effect.
Use real identity values from your app. If you wait for consent, call identify() after tracking is enabled. For identity that must be queued before consent, use the script tag’s setUser() pattern.

Send a product event

Call track() when a meaningful action succeeds and tracking is allowed:
An ordinary event does not change billing status. If this is the value milestone you want to use for activation, select it as your activation event in Outlit. The first matching event records activation once for each eligible resolved person and company, independently. See Customer journey.

Check the result

Open the identified customer’s profile in Customers and look for the event in its activity timeline. If nothing appears, confirm the test domain is enabled under Settings → Website Visitors, tracking consent is active, and the identity call included email or userId. The script tag troubleshooting guide covers delivery and loading problems.

Next steps

Script tag options

Configure automatic tracking, consent, and identity.

npm package

Add tracking to a JavaScript app with explicit configuration.

Outlit Node.js SDK

Send events from a backend or background job.

How tracking works

See how events join customer profiles and timelines.