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.
- Visit. GA4 assigns her browser the client ID
1234567890.1700000000. The page view lands in your warehouse withvisitor_id = 1234567890.1700000000andlanding_page_urlcontainingutm_source=google&utm_campaign=2234567890. - Form fill. She submits a HubSpot form. The Roadway tag writes
1234567890.1700000000into the hiddenga4_pseudo_user_idfield. HubSpot creates contact501with that property. Roadway's CRM table now hascontact_id = 501,visitor_id = 1234567890.1700000000. - Sign up. She creates an account and receives
user_id = usr_8f2c. Your site setsuser_idin GA4 and fires asign_upevent. Roadway's Users table getsuser_id = usr_8f2cwith the signup timestamp. - Payment. Stripe creates customer
cus_Nx8withmetadata.user_id = usr_8f2c. Roadway's revenue table getscustomer_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_iddoesn'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
- One source of truth for
userID. Generate it once, in your application, and pass it to every system. - IDs are opaque strings. Don't add prefixes in one system and not another.
- Identify early. The sooner you tell your analytics tool who someone is, the more of their history you can link.
- No PII in IDs. Use surrogate keys. Hashed emails are still personal data.
- 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_idis valid. It represents an anonymous visitor. But if no page views ever carry auser_id, Roadway can't connect visits to users. - A CRM contact without
visitor_idloads 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
anonymousIDisvisitor_id. Required on every row.userIDisuser_id. Populate it when a visitor becomes a known user. Leave it null for anonymous visitors.- The page-view schema has no
customer_idcolumn.
Users
userIDis 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
customerIDidentifies the paying account.userIDidentifies who to credit. Missing or mismatched values lead to No tracked visit.
CRM
contactIDis the CRM record ID.anonymousIDisvisitor_id. Store it on the contact through a hidden form field. The Roadway attribution tag can fill the field for you, or you can capture the ID yourself.
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.