On most websites, the visitor's browser sends analytics directly to several third-party services. That setup is quick to start, but it loses events to ad blockers and browser privacy features, adds scripts to every page and leaves reports the company cannot fully query or keep. Organizations that run many sites feel it most, because each site reports separately.

A first-party event pipeline, with an endpoint on the company's domain, one event schema for every site, server-side validation and a central store, gives consistent data across sites and keeps working when a vendor's limits or pricing change.

This article compares client-side and server-side tracking, describes the parts of a first-party event pipeline, covers schemas, consent and traffic spikes and shows how HIMSS replaced an analytics service that failed at conference scale. It does not cover attribution models or ad platform setup.

Key takeaways

  • Client-side tracking loses data to ad blockers and browser cookie limits, and adds scripts to every page.
  • Server-side tracking routes events through a server on your own domain, where they can be validated, cleaned and sent to several destinations.
  • Send business events such as sign-ups and orders from the backend, where they cannot be blocked or duplicated by the browser.
  • Use one event schema across all sites, with a unique event ID for deduplication and the visitor's consent state on every event.
  • Server-side tracking must respect consent. It changes where data flows, and the rules about what may be collected stay the same.
  • HIMSS replaced a failing analytics service with a central data platform and event microservice for 20+ websites in one month, and the next conference ran without disruption.

Client-side and server-side tracking compared

Client-side trackingServer-side tracking
Where events are sentThe browser sends them directly to each vendorThe browser, app or backend sends them to your endpoint, which forwards them
Data lossBlocked by ad blockers and privacy features, cookies shortened by browsersLower, especially for events sent from the backend
Page weightOne script per vendorOne small script or none
Control over dataEach vendor receives what its script collectsYou decide what each destination receives
Retention and queryingLimited by each vendorKept in your own store as long as your policy allows
Setup and running effortLowNeeds a server, monitoring and an owner

Browser privacy features are one reason data goes missing. Safari's tracking prevention deletes cookies created by JavaScript after seven days without user interaction with the site, and caps them at 24 hours in some cases, so visitors who return after a week look new in client-side analytics.

The parts of a first-party event pipeline

  1. Collection. A small script or SDK on websites and apps sends interaction events, and backend services send business events such as registrations, subscriptions and payments.
  2. Endpoint on your domain. Events go to a subdomain such as collect.example.com, which you operate.
  3. Validation. Each event is checked against the schema. Invalid events go to a quarantine queue for inspection. Our guide to dead letter queues explains how to handle them.
  4. Enrichment and filtering. The server adds site and campaign context, derives rough location from the IP address and then drops the address, filters known bots and joins events into sessions.
  5. Routing. Events are forwarded to analytics and advertising tools that the visitor has consented to, and always to your own store.
  6. Storage. Raw events are kept for reprocessing, with cleaned and aggregated tables on top. Our article on the medallion architecture describes one way to organize those layers.
  7. Reporting. Dashboards and queries read from the cleaned tables, across all sites at once.

Google's introduction to server-side tagging describes the same idea within Tag Manager: a container runs on a server you control, turns incoming requests into events and lets you decide how data is shaped and where it goes. For backend events sent to Google Analytics, the GA4 Measurement Protocol accepts events over HTTP, and Google describes it as a supplement to tagging in the browser, so the two are usually combined.

Sites and backend services sending events through collection, validation and a queue to one data store

One event schema for many sites

FieldPurpose
event_nameWhat happened, from an agreed list such as page_view, sign_up or purchase
event_idA unique ID that lets the pipeline drop duplicates when an event is retried
timestampWhen it happened, in UTC
site_idWhich website, app or brand sent it
anonymous_id and user_idWho it relates to, before and after login
consentWhich purposes the visitor agreed to when the event was sent
page and referrerWhere it happened and where the visitor came from
propertiesEvent-specific details, defined per event name in the tracking plan

Keep the list of event names short and documented in a tracking plan that every site team uses. Version the schema, so a new property on one site does not break reports for the rest. Deduplication by event ID matters because browsers, apps and backends all retry failed requests. Our guide to idempotency explains the pattern.

Analytics split across many sites and vendors? We build first-party event pipelines and central data platforms that give you one reliable source of truth.

Explore IT outsourcing
  • Consent still applies. Moving collection to the server does not change what the law or the visitor allows. Record consent with every event and forward to each destination only what that consent covers.
  • Collect less. Drop IP addresses after deriving rough location, avoid free-text fields that may hold personal data and hash or remove identifiers that destinations do not need.
  • Set retention. Keep raw events only as long as your policy allows, and delete them on schedule.
  • Know where data lives. Choose the hosting region to match data residency obligations in each market.
  • Support deletion requests. Make it possible to find and remove one person's events across the store.

Rules differ by country. Our guide to PIPEDA compliance covers Canada, and similar principles apply under GDPR in Europe.

Planning for traffic spikes

Collection traffic follows audience traffic, so a product launch, a sale or a live event can multiply it within minutes.

  • Accept fast, process later. The endpoint should validate the request, put the event on a queue and respond immediately.
  • Scale the endpoint on its own. Run collection separately from processing and reporting, so heavy queries never slow down intake.
  • Write in batches. Group events before writing to storage to keep databases from becoming the bottleneck.
  • Load test at peak. Simulate the expected peak, plus a margin, before the event. Our guide to load testing shows how.
  • Monitor intake. Track events per second, rejected events, queue depth and the delay between collection and availability in reports.

A real case: one data platform for 20+ HIMSS websites

HIMSS, the global healthcare information and technology association, runs a network of over 20 conference and media websites. Each site produced its own analytics data in isolation, which made reporting across sites difficult. When a record 45,000 users attended a conference within seven days, the third-party analytics service in use could not handle the load.

A .wrk team of a backend developer, a frontend developer and a project manager:

  • Mapped the data sources of every site in a requirements workshop and defined one unified data model.
  • Designed API contracts between each website and the central store.
  • Built a Drupal-based platform to serve as the central data repository for all HIMSS properties.
  • Built a microservice that collects, normalizes and aggregates event data from each website.
  • Migrated historical data and extended retention beyond the limits of the previous service.
  • Load tested the system against conference-scale traffic.
  • Ran the old and new systems in parallel until the numbers matched, then cut over.

The platform was delivered in one month and brought data from all HIMSS websites into a single queryable source. During the next conference, it handled the 45,000-user spike without disruption, and website behavior and revenue tracking continued as intended. Read the HIMSS centralized data case study.

Daily visitors and registrations for several conference sites during event week

Migrating off vendor analytics: a step-by-step plan

  1. Write the tracking plan. List the events and properties each site needs, with owners and definitions.
  2. Build the endpoint and store. Start with collection, validation and raw storage.
  3. Send events to both systems. Keep the existing analytics running while the new pipeline receives the same events.
  4. Compare daily. Reconcile event counts, users and conversions by site until the difference stays within an agreed tolerance.
  5. Move reporting. Rebuild key dashboards on the new store and let teams check them.
  6. Retire or reduce vendor scripts. Keep only the destinations that still earn their place, and forward to them from the server.

Common mistakes

  • Treating server-side tracking as a consent workaround. It changes the route of the data, and the legal basis for collecting it is still required.
  • No event schema. Each site names events differently, and cross-site reports become manual work.
  • No deduplication. Retries from browsers and backends inflate counts.
  • Processing in the request path. Heavy work at the endpoint makes collection fail during spikes.
  • Cutting over without a parallel run. Differences in counting go unnoticed until a monthly report disagrees with last year's.
  • No owner. A pipeline nobody monitors loses data quietly.
FAQ

Frequently asked questions

What is server-side tracking?

Server-side tracking sends analytics events to an endpoint on the company's own domain, where a server it controls validates, enriches and forwards them to analytics tools or its own data store, in place of browser scripts that send data directly to each vendor.

Is server-side tracking better than client-side tracking?

It usually gives more complete and consistent data, lighter pages and more control over what each vendor receives. It also needs a server, monitoring and an owner, so it suits sites where analytics data drives important decisions.

Does server-side tracking bypass ad blockers and consent?

It can reduce data lost to blockers and browser limits, but it must never bypass consent. Visitors' choices apply to server-side collection in the same way as to scripts in the browser.

What is first-party data in analytics?

First-party data is information a company collects directly from its own visitors and customers on its own sites and apps, stored under its own control, as opposed to data held by third-party vendors or bought from others.

How do you combine analytics from multiple websites?

Use one event schema with a site identifier on every event, have every site send events to one collection endpoint and store them in one place, so reports can compare and combine sites with the same definitions.

To sum up

Server-side tracking gives companies complete, consistent and owned analytics data, especially across many sites. Collect events on your own domain, send business events from the backend, validate them against one schema, deduplicate retries, respect consent on every event, separate intake from processing so spikes do not break collection and run the old and new systems in parallel before switching.

.wrk builds data platforms, event pipelines and analytics dashboards for companies in the US and Europe, including tracking plans, collection services, central stores and reporting.

Want analytics you own across all your sites? Share your sites, tools and traffic peaks, and we will propose a first-party event pipeline and migration plan.

Explore IT outsourcing