CDP

CDP

Client-Side to Server-Side Identity Stitching: Connecting Web Sessions to Backend Systems

Oct 16, 2025

Tyler Zey

Healthcare marketers need to track complete customer journeys—from the first website visit through clinical outcomes. But connecting web sessions to backend systems like CRMs, EHRs, or custom APIs has traditionally been complex and error-prone.

This guide shows you how to use Ours Privacy to stitch together client-side web events with server-side backend events, creating a unified view of your customer journey while supporting HIPAA-compliant data practices.

The Problem: You Can't Track Complete Customer Journeys

Healthcare marketers face a fundamental attribution problem: their customer data is fragmented across systems.

The core issue: Your website tracking and backend systems operate in isolation. Client-side data (website visits, form submissions) lives in one system, while server-side data (CRM records, EHR events, appointment bookings) lives in another. This creates a massive attribution gap.

Without connecting these systems, you're flying blind on questions that matter:

  • Which Google Ads campaign actually drove that new patient appointment?

  • What's the true ROI of your content marketing efforts?

  • How do website interactions correlate with clinical outcomes?

The solution: Identity stitching—connecting client-side and server-side events using a shared identifier. This bridges the attribution gap and gives you complete visibility into your customer journey.

How Identity Stitching Solves This

Identity stitching creates a bridge between your website and backend systems using a shared identifier. Here's exactly how it works:

  1. Capture identifier on website → Store visitor ID or email during web session

  2. Save identifier in backend → Store the same ID in your CRM, EHR, or custom system

  3. Send server-side events → Use the saved identifier to send events back to Ours Privacy

  4. Unified customer view → Ours Privacy reconciles all events into a single customer profile

This approach solves the attribution gap by giving you complete visibility across your entire marketing and clinical funnel. You can finally see which campaigns drive actual business outcomes.

Two Approaches That Work

You have two proven approaches for connecting client-side and server-side events:

Option 1: Use Ours Privacy Visitor ID

Best for: Systems that can store custom fields or when you want maximum control over the identifier.

How it works:

  1. Install Ours Privacy web SDK on your website

  2. Capture the Ours Privacy visitor ID during form submissions (see Visitor Identity and Matching docs for details on getting the visitor ID)

  3. Store the visitor ID in your backend system (Salesforce, CRM, EHR, etc.)

  4. Send server-side events using the stored visitor ID

Option 2: Use Email Address

Best for: Systems that already use email as the primary identifier.

How it works:

  1. Install Ours Privacy web SDK on your website

  2. Always attach email addresses to visitors during form submissions

  3. Send server-side events using the same email address

  4. Ours Privacy automatically matches events to the same visitor profile

Step-by-Step Implementation

Step 1: Install the Ours Privacy Web SDK

First, install the Ours Privacy web SDK on your website. You can install it using Google Tag Manager (recommended for most users) or via direct JavaScript installation.

Step 2: Capture Identifiers During Web Sessions

For Option 1 (Visitor ID):

When a visitor submits a form on your website, capture the Ours Privacy visitor ID and include it in the form data. You can either add it as a hidden field in your form or append it to the request when submitting to your backend. See the Visitor Identity and Matching documentation for details on retrieving the visitor ID from local storage.

For Option 2 (Email Address):

When a visitor submits a form on your website, track the event using ours('track', 'event_name') and include the email address as a parameter. This associates the email with the visitor's session, allowing you to match future server-side events using the same email address.

Step 3: Send Server-Side Events to Ours Privacy

When important events happen in your backend systems, send them to Ours Privacy using the stored identifier. You have several options:

  • Salesforce Integration: Use Salesforce Flow Builder to send events directly from Salesforce when leads convert, opportunities change stage, or other CRM events occur

  • Track API: Send events directly using the Track Events API with the visitor ID or email address

  • Server SDK: Use one of our server SDKs (Node.js, PHP, Python, .NET) if that's easier for your backend implementation

The key is to include either the visitor ID or email address with each event so Ours Privacy can match it to the original web session.

Key Takeaways

  • Identity stitching connects web sessions to backend systems using shared identifiers

  • Two proven approaches: Use Ours Privacy visitor ID or email addresses

  • Complete attribution requires capturing identifiers at each touchpoint

  • Server-side events provide the missing piece for full customer journey tracking

  • HIPAA-compliant data practices are supported through server-side processing and data controls

The goal is simple: create a unified view of your customer journey by connecting every touchpoint. Ours Privacy gives you the tools to stitch together client-side and server-side events, enabling complete attribution and dispatch visibility across your entire marketing and clinical funnel.

Resources

Share Article

Book a Demo

Health systems and digital health companies use Ours Privacy to run essential marketing tools like Google Ads and GA4 while maintaining HIPAA compliance.

Recent Articles

Newsletter

Stay up to date

Subscribe for privacy news, feature updates, events, etc.

Newsletter

Stay up to date

Subscribe for privacy news, feature updates, events, etc.

Newsletter

Stay up to date

Subscribe for privacy news, feature updates, events, etc.

Get a free consultation

Healthcare marketers tell us every day about the challenges of flying blind, navigating compliance, and dealing with ad restrictions. Talk with one of our experts to see if Ours Privacy is the right fit for your organization.

Get a free consultation

Healthcare marketers tell us every day about the challenges of flying blind, navigating compliance, and dealing with ad restrictions. Talk with one of our experts to see if Ours Privacy is the right fit for your organization.

Get a free consultation

Healthcare marketers tell us every day about the challenges of flying blind, navigating compliance, and dealing with ad restrictions. Talk with one of our experts to see if Ours Privacy is the right fit for your organization.