Tracked
Articles

Tracking architecture

Client-side vs. server-side tracking: choose the right event path

Browser and server events observe different parts of the journey. The right setup assigns each event to the system that can verify it.

Client-side tracking runs in the visitor’s browser. Server-side tracking processes or sends events from a server. Neither is automatically more accurate. Accuracy depends on whether the event source can verify what happened and preserve the identifiers needed for attribution.

Most production setups are hybrid. The browser observes page interactions. The server confirms business events such as accepted leads, completed orders, refunds, or subscription changes.

What client-side tracking can observe

Client-side tracking uses JavaScript, an image request, a tag manager, or an SDK running in the page or app.

It is well placed to observe:

  • page views and route changes;
  • button and link clicks;
  • form starts and client-side validation;
  • scroll or engagement interactions;
  • browser and device context available to the page;
  • consent choices made in the interface.

The browser sees the interaction directly. That makes it the natural source for events that exist only in the interface.

But delivery can be interrupted. Scripts can fail to load. A visitor can leave before a request completes. Browser controls and extensions can restrict storage or requests. Consent may prevent collection. A page implementation can also fire an event twice or attach it to the wrong element.

Those are reasons to test the browser path, not reasons to assume every event belongs on a server.

What server-side tracking can observe

Server-side tracking covers several patterns:

  • a website sends measurement requests through a first-party collection endpoint;
  • a backend emits an event after a business transaction changes state;
  • an advertiser sends a postback to a tracker;
  • a server receives browser events, validates them, and routes approved fields to another service.

The server is well placed to verify events owned by backend systems:

  • an order was paid;
  • a lead passed validation;
  • a subscription renewed;
  • a refund completed;
  • an affiliate network approved a conversion.

Server-side processing can also reduce the number of vendor endpoints contacted directly by the browser and give the site owner a place to validate or remove fields before forwarding them. Google’s server-side tagging overview describes this extra processing layer and notes that some browser instrumentation is still needed for browser interactions.

Server-side does not mean automatic or invisible. The server still needs an input. If the event begins with a button click, form interaction, or page view, the browser or app must usually send that signal somewhere.

Compare the event source, not the buzzword

For each event, ask: Which system is the authority that this happened?

Page viewed

The delivery edge can prove it served a response. The browser can prove client code initialized and may have more context about the rendered route. These are related but not identical events.

Choose the event that matches the reporting question. Do not label a server response as an engaged page view if the browser never rendered it.

A tracking redirect can observe the request at the edge. That is often more reliable than waiting for a browser analytics request after navigation begins.

Still exclude prefetches, automated scanners, and known non-user traffic according to your measurement contract. A request is not automatically a human click.

Form started

This is a browser interaction. The backend cannot observe it unless the browser reports it.

Lead accepted

The system that validates and stores the lead is the stronger authority. A browser submit event proves an attempt, not acceptance.

Purchase completed

The order or payment backend is usually the stronger source. A thank-you-page view can be missing, repeated, bookmarked, or opened without the final payment state you intended to measure.

The hybrid event path

A clean hybrid flow separates observation from confirmation:

  1. The tracking link creates a click ID.
  2. The browser receives the landing page and carries the click ID forward.
  3. Browser events record useful on-page steps when consent and configuration permit.
  4. The offer or checkout stores the click ID with the lead or order.
  5. The backend confirms the conversion state.
  6. A server-to-server postback returns the click ID and event data.
  7. The tracker joins the conversion to the original click.

The browser and server now describe different parts of the same journey instead of competing to report the same event.

Deduplication is part of the design

Sometimes the same conversion is sent from both browser and server paths. This can improve resilience only if the receiver knows the two messages describe one event.

Use a stable event ID shared by both paths where the destination supports it. Define:

  • which system creates the event ID;
  • how long duplicates are remembered;
  • which fields win when browser and server payloads disagree;
  • whether retries reuse the same ID;
  • how rejected or unmatched events appear in diagnostics.

Do not deduplicate using only event name and approximate time. Two legitimate purchases can happen close together.

Moving collection to a server changes the data path. It does not erase privacy obligations, platform terms, consent requirements, or the need for data minimization.

Document:

  • which events are collected;
  • the lawful and product basis for each event;
  • which identifiers and fields are included;
  • retention periods;
  • downstream recipients;
  • how deletion or opt-out choices propagate.

Do not send extra fields merely because the server can access them. A controlled collection point is useful only when it actually enforces a controlled contract.

Failure modes to test

Browser-only failures

  • the script is blocked or loads after the visitor leaves;
  • a single-page route change never triggers the expected event;
  • a button listener fires twice;
  • consent state is read too early;
  • navigation cancels the request.

Server-only failures

  • the backend never received the click ID;
  • a retry creates duplicate conversions;
  • an event is emitted before the transaction is final;
  • the server maps the advertiser event to the wrong reporting category;
  • queue or provider delivery fails after the local event is stored.

Hybrid failures

  • browser and server use different event IDs;
  • one path reports gross revenue and the other net revenue;
  • attribution windows differ;
  • test events enter production totals;
  • the tracker records both messages as separate conversions.

Test the expected path and the failure path. A green browser debugger does not prove a backend postback, and a successful postback does not prove on-page interactions were captured.

A practical event ownership worksheet

For every important event, write down:

  1. the event’s plain-language meaning;
  2. the system that can prove it happened;
  3. the identifier used for attribution;
  4. the required fields and their types;
  5. consent and retention rules;
  6. retry and deduplication behavior;
  7. the report where the final event must appear;
  8. the test that proves the public flow works.

This worksheet prevents a common reporting problem: two teams use the same event name for different facts.

Where Tracked fits

Tracked can record the incoming click, route the visitor to a hosted page or offer, and accept conversion postbacks tied to the original click ID. Event journeys help inspect the sequence from page visit through conversion.

Browser storage and collection behavior still depend on your settings, the page, and the visitor’s browser. Spend sync and outbound conversion delivery also depend on the provider and account configuration.

The practical rule

Let the browser report what only the browser can see. Let the backend confirm what the backend owns. Join the two with stable identifiers, explicit event meanings, and tests at every boundary.

Frequently asked questions

Is server-side tracking always more accurate?

No. A server is stronger for events the backend can verify, such as an accepted lead or settled purchase. It cannot directly observe every page interaction, so most complete measurement systems combine browser and server events.

No. Moving delivery to a server does not remove privacy, consent, retention, or data-minimization obligations. The collection purpose and fields still need an authorized basis.

How do you prevent duplicate browser and server conversions?

Give both representations of the same business event a stable event or order identifier, then define which system owns the final outcome. Test retries and delayed delivery before relying on the totals.

Start free and map a campaign journey.