Documentation
Get started
Everything you need to track a site, collaborate safely, understand plan limits, and integrate your data.
Quick Start
Create an organization, add a site, copy its generated snippet, and verify the first event in the dashboard.
Prerequisites
- • An Analytaics account (sign up free)
- • A website where you can add a script tag
- • Owner or admin access to the organization that will own the site
Installation
After creating your account, choose or create an organization, then add a site. Copy the generated snippet from the dashboard and add it to your HTML — ideally in the <head> tag:
<script
defer
data-site="YOUR_SITE_ID"
data-api="https://app.analytaics.com"
src="https://app.analytaics.com/js/tracker.js"
></script>
Replace YOUR_SITE_ID with the ID shown in your dashboard settings.
Framework examples
Next.js (App Router)
app/layout.tsximport type { Metadata } from "next"
export const metadata: Metadata = {
title: "My site",
}
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<script
defer
data-site="YOUR_SITE_ID"
data-api="https://app.analytaics.com"
src="https://app.analytaics.com/js/tracker.js"
></script>
</head>
<body>{children}</body>
</html>
)
}
Verify Setup
After adding the script, open your site in a browser and check your Analytaics dashboard. You should see yourself as a real-time visitor within seconds.
Troubleshooting
- No data showing? Check your browser's Network tab for the tracker request. It should load from your configured Analytaics app URL.
- Ad blocker interference? Some ad blockers may block analytics scripts. Try with extensions disabled or set up a custom domain for the tracker.
- Wrong site ID? Double-check the
data-siteattribute matches your dashboard settings.
Tracker API
The tracker script accepts configuration via HTML attributes:
| Attribute | Required | Description |
|---|---|---|
| data-site | Yes | Your unique site identifier |
| data-api | No | Custom API endpoint (advanced) |
| data-hash | No | Track hash-based routing changes |
Custom endpoint configuration
If you need to proxy tracking through your own domain (for ad-blocker bypass):
<script
defer
data-site="YOUR_SITE_ID"
data-api="https://your-proxy.com"
src="https://your-proxy.com/js/tracker.js"
></script>
Organizations
Organizations keep sites, billing, API keys, members, and plan capacity separate. Use the organization menu in the dashboard header to switch context or create another organization.
| Plan | Sites | Members | Direct site collaborators |
|---|---|---|---|
| Free | 1 | 1 owner | 0 |
| Pro | 5 | 3 | 3 |
| Business | Unlimited | 10 | 20 |
| Enterprise | Unlimited | Unlimited | Unlimited |
Each new organization starts on the Free plan. Active pending invitations reserve capacity.
Teams, Roles, And Invitations
Members can view site analytics, events, goal conversion data, alerts, and exports.
Admins can manage sites, invitations, collaborators, billing, API keys, goals, shared links, competitors, and speed tests.
Owners have admin access plus role management.
Invite workflows
- • Invite to this site: existing users get immediate editor access; new users receive an email invitation.
- • Invite to the organization: recipients accept a member or admin invitation from email.
- • Pending invitations expire after seven days and can be cancelled from the relevant settings page.
Custom Events
Track custom interactions like button clicks, form submissions, signups, and purchases using the global analytaics.track() method.
// Basic event
analytaics.track("signup");
// Event with properties
analytaics.track("purchase", {
plan: "pro",
amount: 9,
currency: "USD"
});
// Button click tracking
document.getElementById("cta-btn").addEventListener("click", () => {
analytaics.track("cta_click", { location: "hero" });
});
Good to know
- • Event names should be lowercase with underscores
- • Properties are optional and can be any key-value pairs
- • Events appear in your dashboard within seconds
Single Page App Support
For SPAs (React, Vue, Next.js, etc.), the tracker automatically detects route changes using the History API. No additional configuration is needed for most frameworks.
<!-- Automatic SPA tracking (default) -->
<script
defer
data-site="YOUR_SITE_ID"
data-api="https://app.analytaics.com"
src="https://app.analytaics.com/js/tracker.js"
></script>
<!-- For hash-based routing (e.g., /#/page) -->
<script
defer
data-site="YOUR_SITE_ID"
data-hash="true"
data-api="https://app.analytaics.com"
src="https://app.analytaics.com/js/tracker.js"
></script>
Exports And Email Reports
Exports
Event and site archives are prepared asynchronously. Wait for the ready notification, then download the archive. The first download starts a 24-hour availability window; after that, the archive is removed.
Email reports
Pro, Business, and Enterprise users can choose Daily, Weekly, or Monthly reports from Account settings. Report periods use UTC: Daily reports cover the previous completed UTC day, Weekly reports run on Monday UTC, and Monthly reports run on the first UTC day of each month.
REST API
Access analytics data programmatically. Owners and admins create read-scoped API keys from the dashboard.
Authentication
# Include your API key in the Authorization header
curl -H "Authorization: Bearer ak_live_your_api_key" \
https://app.analytaics.com/api/v1/sites
Get site statistics
GET /api/v1/sites/:siteId/analytics?period=7d&interval=day
Response:
{
"data": {
"site": { "siteId": "YOUR_SITE_ID" },
"aggregate": { "visitors": 2847, "pageviews": 8421 },
"timeseries": [],
"pages": [],
"countries": []
},
"meta": { "apiVersion": "v1" }
}
Get real-time data
GET /api/v1/sites/:siteId/realtime
Response:
{
"data": {
"visitors": 14,
"pages": [{ "pathname": "/pricing", "visitors": 3 }]
},
"meta": { "apiVersion": "v1" }
}
Frequently Asked Questions
Why does signup say my account already exists?
That email already has an Analytaics account. Sign in instead; no new verification email is sent for an existing account.
Why can't I see Billing or API Keys?
Those pages are available only to organization owners and admins. Members have read/data access to sites.
Why is data missing for my requested date range?
Your organization's plan retention window may clamp older dates. The API reports when it restricts a range.
Why is the header different on a phone?
Mobile navigation separates context, actions, and page tabs so controls do not overlap. The navigation row scrolls horizontally when needed.
Does moving a Resend template into a folder break delivery?
No. Delivery uses the template's published alias, not its dashboard folder, as long as that alias remains unchanged.
Ready to get started?
Create a free account and start tracking in under a minute.