Install the tracking snippet
Add Atlis to your website or web app. Pick the setup that matches how your app is built.
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 app | Use | How it identifies users |
|---|---|---|
| Pages rendered on the server (PHP, WordPress, Laravel, Rails, Django, plain HTML) | window.AtlisConfig | Your 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) | Atlis.identify() | Your app calls identify() once login state is known, and again on route changes. |
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
}
};
</script>
<!-- 2. Load Atlis (after AtlisConfig) -->
<script src="https://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-idis 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 every 60 seconds while the tab is visible. Atlis saves it at most every 5 minutes.
- 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.
Next
More in Install tracking
Try it in your own workspace
Start with a 14-day trial with Growth features. No credit card needed.
Start free