Skip to content
Tracking and technical

What is server-side tracking?

3 min read · Updated · By the Reveata team

Short answerServer-side tracking means your backend, not the visitor's browser, sends events such as sign-ups, payments or page requests to your analytics tool, so they are recorded even when a script is blocked or never runs.

Most web analytics starts in the browser: a small script runs on each page and reports what happens. Server-side tracking moves some or all of that reporting to code you control on your server. The event is created where the action really happened, such as the moment your database saves a new account or your billing code records a charge.

Browser tracking and server tracking compared

Browser script Server-side
Sees page views, scrolling, clicks Yes Only page requests your server answers
Knows the referrer and campaign tags Yes, from the page Only if you pass them on
Affected by ad blockers Sometimes No
Sees bots that never run JavaScript No Yes
Good for Visits and behaviour Confirmed actions: payments, sign-ups, crawler requests

Neither is complete on its own. A server does not know which tab a person scrolled or which link they clicked to arrive. A browser can be blocked, closed early or never run your script at all.

Common uses

  1. Confirmed conversions. A sign-up button click in the browser is not the same as an account your backend actually created. Sending the goal from the server counts only real ones.
  2. Payments. Revenue belongs on the server, where you already know the amount, currency and order id.
  3. Crawlers. Search engines and AI crawlers usually fetch HTML without running JavaScript, so only your server sees them.
  4. Apps and back-office tools with no web page to put a script on.

How Reveata handles it

Reveata uses both sides. The tracking script records visits, sources and behaviour in the browser. From your backend you can:

  • record a goal with reveata events send or the API, using a website API key with the goals:write scope. Pass the visitor id from the browser (reveata.visitorId()) so the goal is credited to the visit that led to it, and a timestamp up to 30 days in the past (send goals from your server);
  • send payments through the Payments API when your provider is not one Reveata connects to directly. Sending the same transactionId twice does nothing, so retries are safe;
  • forward crawler requests so bots that never run JavaScript appear on the bot traffic page.

To get the script itself past blockers, serve it from your own domain with a first-party proxy. That is still browser tracking, just routed through your server.

Pitfalls

  • Lost context. A server event without a visitor id cannot be tied to a source. Pass the id from the browser into your forms or checkout metadata.
  • Double counting. If both the browser and the server send the same goal, you count it twice. Pick one source per event.
  • Personal data. Server code often has names and emails at hand. Only send what you need, and only when your privacy notice allows it.
  • Secrets. Server keys must stay on the server. Never put a website API key in front-end code.

Frequently asked questions

Is server-side tracking more accurate than a script?

For the events it covers, usually yes, because a blocker or a closed tab cannot stop it. But it sees less: no scrolling, no clicks and often no referrer. Most sites get the best picture by recording visits in the browser and confirmed actions on the server.

Does server-side tracking avoid privacy rules?

No. Moving collection to a server does not change what data you process or the rules that apply to it. If you need consent for a purpose in the browser, you still need it when the server does the same thing.

Can I track page views only from my server?

You can forward page requests, but your server cannot tell people from many bots or read the referrer reliably, and it sees nothing in single-page apps after the first load. Reveata uses server-forwarded page requests for crawlers and counts human visits through the script.

See it with your own numbersReveata ties every visit and sale to the source that brought it. Add your website in a minute.
Get started
Was this page useful?
GlossaryWhat is a tracking script?A tracking script is a small JavaScript file you add to every page of a website, which runs in each visitor's browser and sends page views, clicks and other actions to an analytics service.GlossaryWhat is a first-party analytics proxy?A first-party analytics proxy routes the analytics script and the events it sends through an address on your own domain, such as stats.example.com or /dt/event, so the browser sees them as part of your site instead of a request to another company.GlossaryWhat is a custom event in analytics?A custom event is an action you define and send to your analytics tool yourself, such as signup, start_trial or download_pdf, so it can be counted, compared by traffic source and used as a goal or funnel step.GlossaryWhat are Core Web Vitals?Core Web Vitals are three measurements Google uses to describe a page's real-world user experience, namely Largest Contentful Paint (loading), Interaction to Next Paint (responsiveness) and Cumulative Layout Shift (visual stability).GlossaryWhat are event properties?Event properties are key–value details attached to an analytics event, such as the plan chosen or the button clicked on a signup event, so you can break one event down by those details instead of creating a separate event for every variation.GlossaryWhat is a canonical URL?A canonical URL is the one preferred address you want search engines to index and show for a page whose content is reachable at several URLs, usually declared with a rel="canonical" link in the page's head.