---
title: "Quickstart"
description: "Add CanaryLytics to any site in under five minutes. Create a project, paste one script tag, and verify events are flowing with /v1/validate."
last_updated: "2026-07-30"
---

# Quickstart

Adding CanaryLytics to a site takes three things: a project, one script tag, and a page load. No account signup, no config file, no build step.

<Steps>

1. ### Create a project

   Projects are invite-gated. Open the CanaryLytics dashboard, paste your invite code, name the project, and list the domain(s) it will run on (for example `myapp.com`). You get back a secret key:

   ```
   cly_live_5f3a9c2e1b7d4a80f6c3e9d2a1b4c7e0
   ```

   <Aside type="danger" title="Shown once">
     The plaintext key is displayed exactly once, at creation. Only its HMAC hash is stored server-side. If you lose the key, [rotate it](/docs/keys/#rotation) from the dashboard's Settings page to get a new one.
   </Aside>

2. ### Add the tracking snippet

   Paste this before `</body>` (or anywhere in `<head>`) on every page you want tracked. The snippet never carries a key. `data-domain` just needs to match one of the project's trusted domains:

   ```html
   <script src="https://cdn.analytics.canarycoders.es/lytics.js" data-domain="myapp.com" defer></script>
   ```

   If you omit `data-domain`, it defaults to `location.hostname` at runtime.

3. ### Verify the setup

   `/ingest` always answers `204`, even when an event is silently dropped, so there is no error to watch for in the browser. Dry-run the acceptance rules with your key instead:

   ```bash
   curl "https://api.analytics.canarycoders.es/v1/validate?domain=myapp.com&origin=https://myapp.com" \
     -H "Authorization: Bearer cly_live_5f3a9c2e1b7d4a80f6c3e9d2a1b4c7e0"
   ```

   ```json
   { "domain": "myapp.com", "origin": "https://myapp.com", "wouldAccept": true, "checks": { "...": "..." }, "reasons": [] }
   ```

   `wouldAccept: true` means a real visitor's events will be accepted. `wouldAccept: false` comes with a `reasons` array explaining exactly why. See [troubleshooting](/docs/troubleshooting/) for the field-by-field walkthrough.

4. ### Watch the data arrive

   Load a page on the tracked domain, then open the CanaryLytics dashboard. Sessions, pageviews, and the live-visitors counter update within a couple of seconds.

</Steps>

## Next steps

<CardGrid>
  <LinkCard title="Install anywhere" description="SPAs, hash routers, SSR frameworks, Electron, and Capacitor." href="/docs/environments/static-sites/" />
  <LinkCard title="Custom events & goals" description="Track signups and conversions from the browser or your server." href="/docs/tracking/events-and-goals/" />
  <LinkCard title="Embed the widget" description="Live stats in your own admin panel, using the read-only key." href="/docs/widget/" />
  <LinkCard title="How it works" description="Why there's no signup, and why /ingest never returns an error." href="/docs/how-it-works/" />
</CardGrid>

## Sitemap

- [Docs sitemap](https://analytics.canarycoders.es/docs/sitemap.md)
- [Full documentation as a single file](https://analytics.canarycoders.es/llms-full.txt)
