# Server-side tracking

Also called: server-side analytics, server-side events, server-side tagging, backend tracking

Server-side tracking sends analytics events from your own server instead of from a script in the visitor's browser. It records things that happen on the backend, such as a payment or a renewal, reliably and without ad blockers, but it cannot see what happens on the page.

## How it is calculated

In browser tracking, a script on the page sends each pageview and event to the analytics collector. In server-side tracking, your backend calls the collector directly, usually with a secret key, when something happens: a webhook arrives, a signup is saved, a job finishes. A variant, server-side tagging, sends browser events to your own server first, which forwards them on.

The hard part is joining the two. A server event knows nothing about the visit that led to it unless you pass an identifier along, such as a visitor id read in the browser and saved with the signup or the checkout.

## Example

A SaaS records 400 trial starts in its database in a month, but the browser event fires only 340 times, because some visitors block the script and some close the tab before it sends. Moving the event to the server records all 400. Passing the visitor id with each one links 340 to the source of the visit; the other 60 stay unattributed, but counted.

## Common mistakes

- Moving pageviews to the server and losing context. A server sees requests, not screen size, visible time or scroll depth, and it sees cached pages not at all.
- Counting bots as visitors. Every crawler request reaches the server, so server-side pageviews need their own bot filtering.
- Forgetting the identifier. Without a visitor id passed from the browser, a server event cannot be credited to a source or a campaign.
- Treating server-side as a way around consent. Where you send data from does not change what you need permission to collect.

## How CrispStats shows it

CrispStats uses both. Pageviews and on-page events come from the browser script. Your server can send custom events, identify calls and revenue with one POST and a secret key, passing the visitor id you saved from the browser so the event joins that visit. Payments are read from Stripe, Paddle, Shopify and the other providers you connect with a key. AI crawler hits are reported from your edge or middleware, because crawlers never run the script.

## Related terms

- [First-party data](/glossary/first-party-data)
- [Ad blocker](/glossary/ad-blocker)
- [Custom event](/glossary/custom-event)
- [AI crawler](/glossary/ai-crawler)
- [Bot traffic](/glossary/bot-traffic)
