Docs · Install tracking

Install the tracking snippet

Add Atlis to your website or web app. Pick the setup that matches how your app is built.

On this page

The snippet is one script tag. Your workspace's tracking ID is already filled in below, and you can also copy it from Settings → Setup → Install Atlis.

Choose your setup

Your appUseHow it identifies users
Pages rendered on the server (PHP, WordPress, Laravel, Rails, Java with Spring, Django, ASP.NET Core, plain HTML)window.AtlisConfigYour server writes the logged-in user into the page. Atlis identifies them and records a page view on every load.
Single-page apps (Next.js, React, Vue, Svelte, Angular), whatever the backend (Java, .NET, Python, Node)Atlis.identify()Your app calls identify() once login state is known, then track("page_view") on each route change.

Copy the code

Add this to every page, before </body> or in <head>. Only include window.AtlisConfig when someone is logged in.

Any server-rendered site
<!-- 1. Tell Atlis who is logged in (render this on your server) -->
<script>
  window.AtlisConfig = {
    user: {
      id: "usr_8f3k2",            // required: your user's unique ID
      email: "jane@company.com",  // needed to send emails
      name: "Jane Smith",
      plan: "pro",
      trialExpiresAt: "2026-12-01",
      isActivated: true
      // Real signup date (createdAt): send it with Atlis.identify(), see Identify your users
    }
  };
</script>

<!-- 2. Load Atlis (after AtlisConfig) -->
<script src="https://www.theatlis.com/atlis-track.js"
        data-tracking-id="YOUR_WORKSPACE_ID"></script>

Rules that matter

  • Add the script once per page. Never load it twice.
  • data-tracking-id is required. Atlis reads your tracking ID only from this attribute.
  • With window.AtlisConfig, define it before the script tag. Atlis reads it the moment the script loads.
  • Always send the user's email when you identify them. A browser identify call without an email clears the stored email, and Atlis can't send emails without one.
  • Only identify people who are logged in. Anonymous visitors aren't tracked as users.
  • Atlis only accepts snippet data from real browsers. For calls from your server, use the Server API.

What the snippet tracks

  • Last active time. Updated when the user loads a page, and by a heartbeat while the tab is visible. Atlis saves it at most every 5 minutes, and the snippet sends the heartbeat only when a save is due (roughly every 5 to 6 minutes), not every minute.
  • Traffic source. UTM tags, referrer and landing page from the first and latest visit. Shown as the user's source.
  • Events you send with Atlis.track(). See Track events.
  • Key page visits, if you set up key pages in Settings. See Key pages.

Page views are used for last active time and key pages. They aren't stored as individual events.

Exactly what the snippet collects

You can link this list from your privacy policy. The snippet sends only these to Atlis:

  • From `window.AtlisConfig.user` or `Atlis.identify()`: id, email, name, plan, trialExpiresAt, isActivated and any other properties you pass to identify yourself.
  • Where the visitor came from: UTM tags (utm_source, utm_medium, utm_campaign, utm_content, utm_term), atlis_source, the referrer and the landing page address, for the first and latest visit that had them.
  • Activity: the page path on each page view and an activity ping while the tab is visible, sent only when Atlis is due to save it (roughly every 5 to 6 minutes).
  • Events you send with Atlis.track(), with the properties you add.

It never reads cookies, form fields, text on the page or anything else in browser storage. It stores only its own three keys in localStorage (atlis_first_touch, atlis_last_touch, atlis_source_tag) to remember where a visitor first came from, and sets no cookies. The landing page is saved with its full address, so keep secrets such as tokens out of the address of pages people land on.

Stop fake contacts

Your workspace id is visible in your page source, so anyone could send made-up users to it. Turn on identity verification in Settings → Advanced and Atlis only accepts users your server has signed.

Try it in your own workspace

Start with a 14-day trial with Growth features. No credit card needed.

Start free