Getting started
Getting started
Create a project, install the snippet and see your first events in Tracklyne in five minutes.
1. Create a project
Sign up and create a workspace for your team. Inside it, create a project for each product or environment you track (for example Web app and Web app — staging).
Each project has a public project token that starts with tl_. It only allows sending data, so it is safe to ship in a browser or a mobile app. You find it in Project settings → Install.
Server-side calls that read data (local flag evaluation, exports, the query API) use a personal API key starting with tlk_. Keep it secret: it never belongs in client code.
2. Install the snippet
The quickest way on a website is the script tag. Paste it in the <head> of every page. It reads the token from data-token and starts right away:
<script
src="https://tracklyne.com/static/tracklyne.js"
data-token="tl_your_project_token"
defer
></script>Using a bundler? Install the package instead and initialise it once, as early as possible:
npm install @tracklyne/jsThen follow the guide for your platform: JavaScript, Node.js or iOS.
3. Check that events arrive
Open your site and click around. Within a few seconds the Activity view of your project shows $pageview and $autocapture events, with the browser, the country and the page.
- Nothing shows up? Add
data-debug="true"to the script tag (ordebug: truetoinit) and read the browser console. - Using a strict Content Security Policy? Allow
connect-srcandscript-srcfor your Tracklyne host. - Ad blockers can block analytics scripts. Serving the SDK from your own domain through a reverse proxy avoids it.
4. What next
- Identify your users so events from every device join one person.
- Capture the actions that matter to you, such as
signed uporinvoice paid, with their properties. - Turn on session replay and review the privacy settings.
- Ship your first feature flag or survey.
- Coming from PostHog? Import your history.