Skip to content

Website Tracking Methods

CustomerLabs provides two primary methods for tracking user behavior on your website: Client-side (Browser) tracking and Server-side tracking. For most businesses, a hybrid approach using both methods is recommended to ensure maximum data reliability and depth.


Client-side tracking captures user interactions directly in the browser using a JavaScript snippet. When a user visits your website, the CustomerLabs tracking script runs and captures events as they happen.

  1. The CustomerLabs tracking snippet is added to your website’s <head> section.
  2. The script initializes and automatically fires a page view event.
  3. Interactions like clicks and form submissions are captured via the _cl JavaScript API.
  4. Data is sent directly from the user’s browser to CustomerLabs.
  • Rich Behavioral Data: Easily captures UI interactions like button clicks, scrolls, and mouse movements.
  • Automatic Context: Automatically collects browser-level data such as URL, referrer, and user agent.
  • Real-time Attribution: Captures ad platform click IDs (like fbclid and gclid) immediately from the URL.

Server-side tracking captures events from your web server rather than the user’s browser. When an action occurs (like an order confirmation), your server sends that data directly to CustomerLabs via an API or webhook.

  1. An action occurs on your website (e.g., a user completes a purchase).
  2. Your server processes the request and sends the event data to CustomerLabs.
  3. Data is transmitted server-to-server, bypassing the user’s browser entirely.
  • ITP & Ad Blocker Resilience: Since data doesn’t pass through the browser, it cannot be blocked by ad blockers or restricted by browser privacy settings like Safari’s ITP.
  • Higher Data Reliability: Ensures critical events (like purchases or signups) are recorded even if the user closes their browser window early.
  • Security: Sensitive data (like profit margins or internal IDs) can be processed on the server without being exposed in the browser.
FeatureClient-side (Browser)Server-side
Data SourceUser’s BrowserYour Web Server
ImplementationJavaScript SnippetAPI / Webhooks / Plugins
ReliabilityAffected by Ad blockers & ITP100% Reliable (Bypasses browser)
Best ForClicks, Scrolls, Page ViewsPurchases, Sign-ups, Offline actions
Browser ContextNative access (URL, Referrer)Limited (Must be passed manually)
Privacy SupportBrowser-dependentHighly secure & compliant

To get the most out of your first-party data, CustomerLabs recommends a hybrid tracking setup:

  1. Use Client-side tracking to capture the rich behavioral journey, anonymous user identifiers, and initial ad click IDs.
  2. Use Server-side tracking for the bottom of the funnel events (like Purchase or Subscription Activated) to ensure 100% attribution accuracy and bypass browser restrictions.

CustomerLabs automatically deduplicates events if the same action (e.g., a purchase) is tracked both client-side and server-side.