RoadwayDocs

Identity resolution

Identity resolution is how Roadway decides that a visit, a sign-up, a CRM contact, and a payment all belong to the same person.

The joins

Roadway doesn't match people by email or name. It joins on IDs.

Join Left side Right side Notes
Visit to user page_views.user_id users.user_id user_id must be the same value in page views and users. Roadway copies it back onto the browser's earlier anonymous page views.
User to revenue fact__transactions.user_id or dim__customers.user_id users.user_id Revenue is credited to the paying user's acquisition touchpoints.
Contact to visit dim__contacts.visitor_id page_views.visitor_id Needs the anonymous ID captured on the form.
Deal to contact dim__opportunities.contact_id dim__contacts.contact_id HubSpot: the oldest associated contact. Salesforce: the opportunity's primary contact (Opportunity.ContactId).
App touchpoint to user custom_user_id (MMP) users.user_id Only for users without a pre-signup web visit.

An example journey

Priya sees a Google ad, reads your pricing page, requests a demo, and later signs up and pays.

  1. Visit. GA4 assigns her browser the client ID 1234567890.1700000000. The page view lands in your warehouse with visitor_id = 1234567890.1700000000 and landing_page_url containing utm_source=google&utm_campaign=2234567890.
  2. Form fill. She submits a HubSpot form. The Roadway tag writes 1234567890.1700000000 into the hidden ga4_pseudo_user_id field. HubSpot creates contact 501 with that property. Roadway's CRM table now has contact_id = 501, visitor_id = 1234567890.1700000000.
  3. Sign up. She creates an account and receives user_id = usr_8f2c. Your site sets user_id in GA4 and fires a sign_up event. Roadway's Users table gets user_id = usr_8f2c with the signup timestamp.
  4. Payment. Stripe creates customer cus_Nx8 with metadata.user_id = usr_8f2c. Roadway's revenue table gets customer_id = cus_Nx8, user_id = usr_8f2c.

After sign-up her page views carry both 1234567890.1700000000 and usr_8f2c, and Roadway copies usr_8f2c onto her earlier anonymous page views. Roadway can now credit her payment to the Google campaign 2234567890.

What breaks a join

Symptom Likely cause Fix
Revenue under No tracked visit user_id in billing doesn't match user_id in Users, or the user has no tracked visit Pass userID to Stripe, then check format and case
CRM contacts with empty visitor_id Hidden field missing or not filled, or property not synced to the CRM Troubleshoot the tag
Users never linked to visits user_id never set in your analytics tool GA4, Segment, PostHog
IDs look right but don't match Different formats, such as 42 vs usr_42, or different casing Standardize in one place and re-sync
Same person split across IDs Cleared cookies, reset() calls, new device Expected. Identification at login reconnects what it can.

How Roadway treats unmatched data

Records that can't be matched are kept, not dropped.

  • Unmatched users and recurring-revenue customers. Users with no matched visit, and transactions and recurring-revenue customers whose user_id doesn't match a user, are reported in full under traffic source Unknown, channel No tracked visit, campaign N/A.
  • Contacts with no visitor_id. A CRM contact without an anonymous ID still counts in your CRM funnel, but has no website touchpoints. Roadway reports it under No tracked visit or, if agreed during onboarding, under the source your CRM recorded (for example HubSpot's Original source).

How Roadway handles several or conflicting IDs

Roadway matches people by ID only. There is no probabilistic or email-based matching.

  • All devices that report the same user ID become one person. A device that never reports a user ID stays anonymous.
  • When IDs conflict, the user ID wins over the anonymous ID.
  • On a shared device, each page view goes to the user signed in at that time. Earlier anonymous page views go to the first user.
  • Users who share a visitor and the exact same first page-view timestamp are treated as one identity.
  • Visits from several devices of the same person are credited to that person. With GA4, each device keeps its own GA4 session.

Design principles that keep joins healthy

  1. One source of truth for userID. Generate it once, in your application, and pass it to every system.
  2. IDs are opaque strings. Don't add prefixes in one system and not another.
  3. Identify early. The sooner you tell your analytics tool who someone is, the more of their history you can link.
  4. No PII in IDs. Use surrogate keys. Hashed emails are still personal data.
  5. Test with a real journey after every change.

Required IDs by table

Each dataset needs different IDs.

Table Required IDs Optional IDs
Sessions (page views) anonymousID, userID (required for attribution; null allowed on anonymous rows) None
Users userID customerID
Revenue customerID, userID anonymousID
CRM contactID, anonymousID userID, customerID

Required for loading versus required for attribution

The schemas in Table schemas are looser than the table above. For example, user_id is nullable in page views, and visitor_id is nullable in the CRM contacts table.

Read the table above as what you need for complete attribution:

  • A page view without user_id is valid. It represents an anonymous visitor. But if no page views ever carry a user_id, Roadway can't connect visits to users.
  • A CRM contact without visitor_id loads fine, but it can't be attributed to a channel.

Roadway links visitors to users only through page views that carry user_id. The Users table supplies user_id and the sign-up time, not the link. Set user_id on page views once the visitor is known. One identified page view links the whole visitor history.

Per-table guidance

Sessions

  • anonymousID is visitor_id. Required on every row.
  • userID is user_id. Populate it when a visitor becomes a known user. Leave it null for anonymous visitors.
  • The page-view schema has no customer_id column.

Users

  • userID is the primary key.
  • Roadway doesn't read an anonymous ID from the Users table (for example Segment identifies.anonymous_id). The link comes from page views.

Revenue

  • customerID identifies the paying account.
  • userID identifies who to credit. Missing or mismatched values lead to No tracked visit.

CRM

ID crosswalk

Each tool names the same IDs differently.

Anonymous ID

Vendor Name Where to find it
Roadway anonymousID, column visitor_id Page views and CRM contacts
Google Analytics 4 user_pseudo_id, also client ID _ga cookie, BigQuery user_pseudo_id, gtag('get', 'G-XXXX', 'client_id', cb)
Segment anonymousId analytics.user().anonymousId(), warehouse column anonymous_id
PostHog $device_id. Roadway uses $device_id as visitor_id (falls back to distinct_id). posthog.get_property('$device_id')
HubSpot hubspotutk cookie (visitor token, not the same as GA4 or Segment IDs) Browser cookie
MMPs (Singular so far) Device or install IDs (not used by Roadway) MMP exports

User ID

Vendor Name Where to set it
Roadway userID, column user_id Everywhere
Google Analytics 4 user_id gtag('set', {user_id}) or Google tag configuration setting
Segment userId analytics.identify(userId)
PostHog distinct_id after identify posthog.identify(distinctId)
Stripe Customer metadata.user_id (default key, configurable). Checkout Session client_reference_id needs a custom mapping by Roadway. Customer
AppsFlyer customer_user_id setCustomerUserId
Adjust A callback parameter you define, for example user_id addGlobalCallbackParameter
Singular Custom user ID setCustomUserId
Branch developer_identity setIdentity
Roadway column for MMPs custom_user_id MMP export

Customer ID

Vendor Name
Roadway customerID, column customer_id
Stripe Customer ID, cus_...

Contact ID

Vendor Name
Roadway contactID, column contact_id
HubSpot Contact Record ID (hs_object_id)
Salesforce Id of the Contact (default) or the Lead, when Roadway models your funnel on Leads

contact_id is the HubSpot contact Record ID in every path. The in-app HubSpot connector lands data in the same models as a warehouse load. With the HubSpot form-cookie method, Roadway stores HubSpot's canonical-vid, which is the Record ID of the surviving contact.