# SuprAnalytics documentation

> Website analytics, revenue attribution and live chat in one platform. Every page below is also on the web without `.md`.

## Get started

Install the script, connect payments and read your first insights.

- [Get started in 3 steps](https://supranalytics.app/docs/getting-started.md): Install the tracking script, link revenue to traffic and track your first goals.
- [Connect a payment provider](https://supranalytics.app/docs/connect-payment-provider.md): Connect Polar, Stripe, Dodo Payments, Paddle, Lemon Squeezy or the Payment API in about five minutes: add the webhook, paste its secret, pass the visitor id.
- [Track campaigns with UTM tags and ref links](https://supranalytics.app/docs/tracking-parameters.md): The link parameters SuprAnalytics reads (utm_source, utm_campaign, ref, via and more), how a visit's source is chosen, and how its channel is worked out.
- [Filter your data](https://supranalytics.app/docs/filters.md): Click any row to filter the whole dashboard, save filters as segments, pick dates and intervals with keyboard shortcuts, and compare with the previous period.
- [Track custom goals](https://supranalytics.app/docs/custom-goals.md): Signups, clicks and any event: from JavaScript, HTML attributes, your server or page visits.
- [Build a conversion funnel](https://supranalytics.app/docs/conversion-funnels.md): Build a funnel of 2 to 8 page, goal or payment steps and see how many visitors reach each step, where they drop off and how long each step takes.
- [Measure retention](https://supranalytics.app/docs/retention.md): See how many people came back in each day, week or month after their first visit or first goal, and how identifying signed-in users makes it accurate.
- [See visitors in real time](https://supranalytics.app/docs/realtime.md): The Online view: a live globe of everyone active in the last 5 minutes, a streaming activity feed, and browser sounds for visitors, goals, payments and chats.
- [Visitor journeys](https://supranalytics.app/docs/visitor-journeys.md): Open any visitor's journey: every visit with its source, and every page, goal and payment in order. Find customers and identified visitors by name or email.
- [Watch session recordings](https://supranalytics.app/docs/session-recordings.md): Session recordings are on for every website: choose how many visits to record and what to hide, find the ones worth watching by tag or group, and watch them played back.
- [See where people click and scroll](https://supranalytics.app/docs/heatmaps.md): See where people click on each page and how far down they scroll, on desktop, tablet and mobile: who clicks where, rage clicks, the most clicked elements, and a PNG to download.
- [Track Core Web Vitals and your site score](https://supranalytics.app/docs/performance.md): Real visitors' Core Web Vitals (LCP, INP, CLS, FCP, TTFB) at the 75th percentile by page, device, browser and country, and a daily audit of your homepage: PageSpeed, quality and security.
- [Monitor your website's uptime](https://supranalytics.app/docs/uptime.md): Your homepage is checked every 5 minutes, with its status, uptime over 7 to 365 days, response times, outages and their causes, and an alert by email or Telegram when it goes down.
- [How metrics are counted](https://supranalytics.app/docs/metrics.md): How visitors, sessions, pageviews, bounce rate, session time, revenue and conversion rate are defined, what filters select, and what isn't counted.

## Installation guides

Add the script to any website, framework or builder.

- [Installation guides for every platform](https://supranalytics.app/docs/installation.md): One small, deferred script on every page is all SuprAnalytics needs. Find the guide for your platform, from plain HTML and Next.js to WordPress and Shopify.
- [Install the tracking script on any website](https://supranalytics.app/docs/html.md): Paste the snippet in the <head> of every page of any HTML website, see what supr-website-id and supr-domain do, and check that visits arrive.
- [Next.js analytics: install the tracking script](https://supranalytics.app/docs/nextjs.md): Add the script with next/script in the App or Pages Router, type window.supr, identify signed-in users, test on localhost and attribute Stripe or Polar revenue.
- [Install the tracking script in a React app](https://supranalytics.app/docs/react.md): Add the snippet to index.html in Vite or Create React App. React Router navigation counts as pageviews, and goals can be sent from components.
- [Install the tracking script in Vue.js or Nuxt](https://supranalytics.app/docs/vuejs.md): Add the snippet to index.html for Vue or to app.head in nuxt.config.ts for Nuxt. History mode is tracked automatically; hash mode needs supr-hash.
- [Install the tracking script in Astro](https://supranalytics.app/docs/astro.md): Add the snippet with is:inline to the layout every Astro page uses. Navigation with view transitions is tracked automatically.
- [Install the tracking script in SvelteKit](https://supranalytics.app/docs/sveltekit.md): Add the snippet to src/app.html so it loads on every page. SvelteKit's client-side navigation is tracked automatically.
- [Install the tracking script on WordPress](https://supranalytics.app/docs/wordpress.md): Add the snippet with a header code plugin such as WPCode, or from your child theme's functions.php, and keep caching plugins from delaying it.
- [Webflow analytics: install the tracking script](https://supranalytics.app/docs/webflow.md): Paste the snippet in Webflow's Head code, test on your webflow.io address, track a signup button with a custom attribute and attribute checkout-link payments.
- [Framer analytics: install the tracking script](https://supranalytics.app/docs/framer.md): Add the snippet as a script in Framer's Project Settings → Custom Code, test on your framer.app address and attribute payments from checkout links.
- [Install the tracking script on Shopify](https://supranalytics.app/docs/shopify.md): Paste the snippet into layout/theme.liquid to track your storefront, and send orders with the Payment API, since checkout pages don't run theme scripts.
- [Install the tracking script on Ghost](https://supranalytics.app/docs/ghost.md): Paste the snippet in Site Header under Settings → Code injection in Ghost admin, save, and check that visits arrive.
- [Install the tracking script on Wix](https://supranalytics.app/docs/wix.md): Add the snippet as custom code in the Head of all pages from Settings → Custom code. Wix needs a connected domain and a paid plan for custom code.
- [Install the tracking script on Squarespace](https://supranalytics.app/docs/squarespace.md): Paste the snippet in the Header field of Squarespace's Code Injection settings. Code injection needs a Business plan or higher.
- [Install the tracking script with Google Tag Manager](https://supranalytics.app/docs/google-tag-manager.md): Load the snippet from a Custom HTML tag that fires on all pages, then publish. Pasting it in your site's <head> holds up better against ad blockers.
- [Install the tracking script in Laravel](https://supranalytics.app/docs/laravel.md): Add the snippet to the Blade layout your pages extend, and wrap it in @production to track only your production site.
- [Install the tracking script in Django](https://supranalytics.app/docs/django.md): Add the snippet to the base template your pages extend, and wrap it in an if-not-debug block to leave it out in development.
- [Set up tracking with a coding agent or AI builder](https://supranalytics.app/docs/ai-builders.md): Copy one setup prompt into Claude Code, Cursor, Codex, Lovable, Bolt, v0 or Replit to install the script, track goals, identify users and attribute revenue.

## Revenue attribution

Find which channels, campaigns and pages bring paying customers.

- [How revenue attribution works](https://supranalytics.app/docs/revenue-attribution.md): How SuprAnalytics ties each payment to the visitor who made it and their earlier visits, first touch versus last touch, and payments without a visitor id.
- [Connect Polar: setup guide](https://supranalytics.app/docs/polar.md): Add a Polar webhook for paid, updated and refunded orders, paste its secret, and see how revenue, renewals and refunds from Polar are counted.
- [Attribute Polar Checkout Links without code](https://supranalytics.app/docs/polar-checkout-links.md): The script adds the visitor id to Polar Checkout Links as reference_id when they're clicked, and the webhook brings it back with the order.
- [Attribute Polar checkouts created on your server](https://supranalytics.app/docs/polar-checkout-api.md): Read the supr_visitor_id cookie when your server creates a Polar checkout and pass it as metadata, with examples for Node.js, Next.js and Python.
- [Connect Dodo Payments: setup guide](https://supranalytics.app/docs/dodo.md): Add a Dodo Payments webhook, use payment links with no code or pass the visitor id to checkout sessions, and see how revenue, renewals and refunds are counted.
- [Connect Paddle: setup guide](https://supranalytics.app/docs/paddle.md): Add a Paddle notification destination, let checkout buttons carry the visitor id or pass it as customData with Paddle.js, and see how refunds are counted.
- [Connect Stripe: setup guide](https://supranalytics.app/docs/stripe.md): Add a Stripe webhook for checkout sessions, invoices and refunds, paste its signing secret, and see how payments, renewals and refunds are counted.
- [Attribute Stripe Checkout Sessions](https://supranalytics.app/docs/stripe-checkout-api.md): Pass the supr_visitor_id cookie as metadata when your server creates a Checkout Session, and on the subscription so renewals keep it. Node.js, Python and PHP.
- [Attribute Stripe Payment Links](https://supranalytics.app/docs/stripe-payment-links.md): Add the visitor id to buy.stripe.com links as client_reference_id with a few lines of JavaScript, so Payment Link purchases are credited to their visits.
- [Connect Lemon Squeezy: setup guide](https://supranalytics.app/docs/lemonsqueezy.md): Add a Lemon Squeezy webhook with a signing secret, pass the visitor id as checkout custom data, and see how orders, renewals and refunds are counted.
- [Send payments from any provider](https://supranalytics.app/docs/payments-api.md): Using Gumroad, your own billing or another provider? Send each payment, renewal and refund from your server with a website API key and the visitor id.
- [Renewals, refunds & currencies](https://supranalytics.app/docs/renewals-refunds.md): How subscription renewals are credited to the first visit, how each provider's full and partial refunds are counted, and how other currencies are converted.

## Proxy guides

Serve the script from your own domain so ad blockers don't hide visits.

- [Stop ad blockers from hiding visits](https://supranalytics.app/docs/proxy-guide.md): Ad blockers and privacy browsers block analytics hosts. Serve the script from your own domain, with the managed proxy or your own proxy, to count those visits.
- [Serve the script from your own subdomain](https://supranalytics.app/docs/managed-proxy.md): Serve the script and its events from a subdomain such as a.yourdomain.com: pick it in Settings, add one CNAME record, wait for Active and update your snippet.
- [Proxy the script through your own server](https://supranalytics.app/docs/own-proxy.md): Forward /js/script.js and /api/event with nginx, Caddy, Next.js rewrites or Express, and the location and rate-limit trade-offs the managed proxy avoids.

## Advanced features

Configure the script, identify users and go further with SuprAnalytics.

- [Script configuration](https://supranalytics.app/docs/script-configuration.md): Every supr-* attribute of the tracking script, the HTML attributes for goals and scroll events, the window.supr() API, and what the script tracks on its own.
- [GDPR and cookieless tracking](https://supranalytics.app/docs/cookieless-tracking.md): What SuprAnalytics stores and never stores (no IP addresses), and how cookieless mode recognises visitors with a daily hash, with its trade-offs.
- [Set your #1 KPI](https://supranalytics.app/docs/number-one-kpi.md): Make a goal such as signups the dashboard's main figure instead of revenue, so the chart and every panel's bars show its completions.
- [Exclude visits](https://supranalytics.app/docs/exclude-visits.md): Your own visits, IPs, paths, hostnames, countries and attack mode.
- [Track across subdomains](https://supranalytics.app/docs/subdomain-tracking.md): Track your website and its subdomains, like app.yourdomain.com, as one website, and keep each person one visitor across them with supr-domain.
- [Track additional domains](https://supranalytics.app/docs/cross-domain-tracking.md): Send data from several domains to one website, and keep one visitor across them with supr-allowed-hostnames, so a payment on one credits visits on another.
- [Track hash-router pages](https://supranalytics.app/docs/hashed-page-paths.md): Count route changes in apps with a hash router (yourdomain.com/#/pricing) as pageviews by adding supr-hash to the script.
- [User identification](https://supranalytics.app/docs/user-identification.md): Attach a name, email and your own user id to a visitor with the identify call, so the live view, journeys and goal alerts show who they are.
- [Track scroll events](https://supranalytics.app/docs/scroll-tracking.md): Complete a goal when an element scrolls into view, like a pricing section or the end of an article, with supr-scroll and an optional threshold and delay.
- [Track AI and search crawlers](https://supranalytics.app/docs/bot-traffic-tracking.md): AI assistants and search engines don't run JavaScript. Report their requests from your server to see when ChatGPT, Claude, Google and others read your pages.
- [GitHub commits on the chart](https://supranalytics.app/docs/github-integration.md): Connecting a GitHub repository isn't available right now. Websites connected earlier keep showing their commits on the chart; use notes to mark what shipped.
- [Google Search Console](https://supranalytics.app/docs/google-search-console.md): Connect Google Search Console read-only to see the queries and pages people found you through, with clicks, impressions, click-through rate and position.
- [Import your history from DataFast](https://supranalytics.app/docs/import-from-datafast.md): Bring your DataFast history into SuprAnalytics with the website's API key: daily visitors, pageviews and sessions, and the monthly sources, pages, countries, devices, browsers and operating systems.
- [Import your history from Google Analytics](https://supranalytics.app/docs/import-from-google-analytics.md): Bring your GA4 history into SuprAnalytics by signing in with Google: daily visitors, pageviews and sessions, and monthly sources, channels, pages, countries and devices.
- [Import your history from Fathom](https://supranalytics.app/docs/import-from-fathom.md): Bring your Fathom history into SuprAnalytics with an API token and the site's ID: daily people and pageviews, and monthly sources, pages, countries, devices and browsers.
- [Import your history from Plausible](https://supranalytics.app/docs/import-from-plausible.md): Bring your Plausible history into SuprAnalytics with a Stats API key: daily visitors, pageviews and visits, and monthly sources, channels, pages, countries, devices and browsers.
- [Add notes to the chart](https://supranalytics.app/docs/chart-notes.md): Click the chart to note a launch or an outage, see the chats and commits at that moment, pin the notes that matter, and choose what's drawn.
- [Embeddable widgets](https://supranalytics.app/docs/embeddable-widgets.md): Embed a live visitors pill, a revenue card, a visitors chart or a README badge on any page, with options for the period, theme and colors. Totals only.
- [Chat with your website visitors](https://supranalytics.app/docs/live-chat.md): Turn on the chat widget with no extra code, answer visitors from the Inbox, use quick replies and page alerts, and set the launcher, availability and pages.
- [Email alerts for completed goals](https://supranalytics.app/docs/alerts.md): Get an email every time a visitor completes a goal, with who they are, where they came from and their device, in a subject and body you write with variables.
- [Weekly and spike reports](https://supranalytics.app/docs/email-reports.md): A weekly email comparing the last 7 days with the 7 before, an email when the last hour's visits reach 4 times the usual hourly average, and alerts when your website goes down.
- [Public dashboards](https://supranalytics.app/docs/public-dashboards.md): Share a read-only dashboard at a public link, with the same charts and panels, while names, emails, journeys, single payments and settings stay private.

## MCP

Ask Claude, or any MCP client, about your analytics.

- [Connect Claude, ChatGPT or any MCP client](https://supranalytics.app/docs/mcp.md): Add the MCP server to Claude, ChatGPT, Claude Code or any MCP client, sign in or use an API key, and ask about anything on your dashboard in plain words.
- [MCP tool reference](https://supranalytics.app/docs/mcp-tools.md): Every read-only tool on the MCP server, with its arguments, and the periods, dimensions, filters and attribution models they accept.

## API reference

Read your reports, and send goals, payments and crawler hits from your server.

- [REST API: authentication, errors and rate limits](https://supranalytics.app/docs/api.md): Send goals, payments and crawler hits from your server with a website API key: the base URL, authentication, endpoints, error codes and rate limits.
- [Read API](https://supranalytics.app/docs/api/read.md): Read everything the dashboard shows with an account API key: every report from traffic to uptime, the personal data permission, the errors and the limits.
- [SuprAnalytics CLI](https://supranalytics.app/docs/cli.md): Read your account from the terminal with npx @supranalytics/cli: every website's traffic and revenue, health, uptime, site audit findings and peak hours, as tables or JSON.
- [Goals API](https://supranalytics.app/docs/api/goals.md): Record a goal for a visitor from your server with POST /api/v1/goals: the request body, examples in curl, Node.js and Python, and the responses.
- [Payments API](https://supranalytics.app/docs/api/payments.md): Record a payment, renewal or refund with POST /api/v1/payments and attribute it to the visitor's visits: every field, examples and responses.
- [Crawler hits API](https://supranalytics.app/docs/api/crawl.md): Report AI and search crawler requests from your server with POST /api/v1/crawl, one hit or up to 100 at a time: the fields, an example and the response.

## Account & billing

Plans, usage limits, team access, signing in and deleting your data.

- [Plans & billing](https://supranalytics.app/docs/plans.md): The 14-day free trial, the monthly plans by events, and paying through Polar.
- [Usage & limits](https://supranalytics.app/docs/usage-limits.md): What counts as an event, monthly limits, session recordings, storage and retention.
- [When a plan lapses](https://supranalytics.app/docs/lapsed-plans.md): A trial that ends or a paid period that isn't renewed: collection and chat stop and the dashboard is restricted until you choose a plan.
- [Team & access](https://supranalytics.app/docs/team.md): Invite members and viewers to a website from its Settings → Team: what each role can do, how an invitation is accepted, and how to change or remove access.
- [Signing in](https://supranalytics.app/docs/sign-in.md): Sign in with Google, a magic link or a password, or sign up with a code sent to your email. The same email always opens the same account.
- [Delete your account or data](https://supranalytics.app/docs/delete-account.md): Delete your account and the websites it owns, delete a single website, or reset a website's analytics, visitor profiles, payments and chats while keeping its settings.

## Troubleshooting

When something doesn't show up as expected.

- [Not seeing any data](https://supranalytics.app/docs/no-data.md): Six checks when the dashboard stays empty: the script on the page, the website id and domain, blockers and exclusions, localhost, CSP and stripped attributes.
- [Fix Content Security Policy (CSP) errors](https://supranalytics.app/docs/csp.md): When a Content-Security-Policy header blocks the script, add SuprAnalytics to script-src and connect-src, and to img-src and media-src for live chat.
- [Fix duplicate payments](https://supranalytics.app/docs/duplicate-payments.md): Why one sale can show up twice (a webhook and the Payment API, or two webhooks for one website) and how to keep each payment counted once.
