# Quickstart

This is the markdown version of https://statlark.com/docs/quickstart. Every docs and Learn page has one: add .md to its address. Index: https://statlark.com/llms.txt

Six steps from sign-up to your first visitor, payment and goal. The first four take a few minutes; Stripe and goals can wait until you’re ready.

## <a id="account"></a>1. Create your account

[Sign up](https://statlark.com/signup) with your email. The trial is 14 days and needs no card. See [plans, trial and billing](https://statlark.com/docs/billing.md) for what happens after it.

## <a id="site"></a>2. Add your site

Name your workspace: usually your company or project. Then, under [Settings → Sites](https://statlark.com/settings), choose **Add site** and enter the domain, the currency your revenue is in and your timezone. Days and charts follow that timezone, and revenue in any other currency is left out rather than converted.

## <a id="install"></a>3. Install the script

Add this line to the `<head>` of every page. Copy it from [Settings → Install](https://statlark.com/settings), where your site ID is already filled in.

```html
<script
  defer
  src="https://statlark.com/script.js"
  data-website-id="YOUR_SITE_ID"
></script>
```

The tag sets a first-party analytics cookie as soon as it loads. Where the law asks for consent first, such as for visitors in the EU or UK, install the [consent banner](https://statlark.com/docs/consent.md) in its place: it loads the tracker only after the visitor accepts. Or switch on [cookieless mode](https://statlark.com/docs/script-configuration.md#cookieless), which stores nothing on the device.

Exactly where the line goes depends on how your site is built: [Install on your platform](https://statlark.com/docs/install.md) covers Next.js, WordPress, Shopify, Webflow, Google Tag Manager and the npm package.

### <a id="ai-prompt"></a>Hand this to your AI

For AI tools: this is the prompt a customer pastes in to start this task. If you are already following it, don’t start again: use the rest of this page as the guide.

Building with Claude Code, Cursor, Lovable or another AI tool? Paste this in. Replace `YOUR_SITE_ID` first, or copy the prompt from Settings → Install, where it’s filled in.

```
Add Statlark analytics to this project for my site.

Add this script to the <head> of every page, exactly once:

<script defer src="https://statlark.com/script.js" data-website-id="YOUR_SITE_ID"></script>

If the data-website-id above isn't a real site ID (they start with sl_), ask me for it.

1. First check the site doesn't already load Statlark, whether through this script, consent.js, @statlark/web or a first-party proxy. If it does, stop and tell me.
2. Statlark sets first-party analytics cookies. Ask me whether this site has visitors in the EU or UK; you can't tell from the code. If it does, or I'm not sure, stop before adding the script, because it may need to load through the consent banner: https://statlark.com/docs/consent.md
3. Put it in the shared layout or template, so every page gets it. Use the project's normal way of adding a head script, such as the root layout in Next.js or index.html in a single-page app.
4. If the site has a Content Security Policy (check its server or framework config and any <meta http-equiv="Content-Security-Policy"> tag), allow https://statlark.com for scripts and https://collect.statlark.com for connections.
5. Don't change anything else. Finish by telling me what you changed, and remind me to confirm it in Statlark under Settings, Install, Verification.
```

## <a id="check"></a>4. Check it’s working

Open your site in a normal browser window. [Settings → Install](https://statlark.com/settings) shows “Waiting for your first event” and switches to live within seconds of the first visit, and your visit shows on the Overview’s live view.

Nothing after a minute? Visits from `localhost` aren’t counted unless you turn that on, and a browser you excluded with `?statlark_ignore=1` stays excluded. [Troubleshooting](https://statlark.com/docs/troubleshooting.md) goes through the rest.

## <a id="stripe"></a>5. Connect Stripe

In [Settings → Revenue (Stripe)](https://statlark.com/settings), copy the webhook URL, add it as an endpoint in Stripe, and paste its signing secret back. We never ask for your Stripe API key. Then tell Statlark which visitor made each payment, either by email or by stamping the visitor ID on your Checkout Session. [Revenue attribution](https://statlark.com/docs/revenue-attribution.md) has every step.

Not on Stripe? Send payments from your server through the [REST API](https://statlark.com/docs/api.md#writing) instead.

## <a id="goal"></a>6. Track your first goal

A goal is any conversion you care about, such as `signup` or `trial_started`. You don’t create it in the dashboard: fire it from your site, and it appears on the Goals card the first time it fires.

```js
// Fire it the moment the conversion happens, e.g. right after a signup.
// The script loads with defer, so guard for it.
window.statlark?.goal("signup");
```

[Goals & conversions](https://statlark.com/docs/goals-conversions.md) covers properties, targets, your #1 KPI and email alerts.

## <a id="next"></a>What next

- [Reading your data](https://statlark.com/docs/reading-your-data.md): what each number means.
- [Identifying users](https://statlark.com/docs/identifying-users.md): follow one person across devices and see their lifetime value.
- [AI assistants](https://statlark.com/docs/mcp.md) and the [command line](https://statlark.com/docs/cli.md): ask about your numbers from Claude, ChatGPT or a terminal.

Last reviewed 21 November 2026
