Prompt
How can I integrate a referral program platform into a direct-to-consumer founder funnel without losing attribution?
Latest observation
To integrate a referral platform into a direct-to-consumer founder funnel without losing attribution, design the funnel so the original acquisition source is captured before the referral platform ever overwrites it, and then persist both first-touch and referral-touch identifiers across the whole journey.
The core principle
You need to separate:
- Acquisition attribution: where the customer originally came from
- Referral attribution: who referred them later
If you rely on only one cookie or one “source” field, the referral platform will often overwrite the founder-funnel source. Instead, store both.
Recommended architecture
1) Capture first-touch source at the earliest page view
When a visitor lands on your site:
- read UTM parameters, referrer, ad click IDs, founder-funnel campaign IDs, etc.
- store them in:
- a first-party cookie
- local storage
- your backend session/profile object if email is known
Important fields to save:
utm_sourceutm_mediumutm_campaignutm_contentutm_termreferrerlanding_pageclick_idvalues likegclid,fbclid,ttclid- your own
funnel_source_idif you use one
2) Assign your own internal attribution ID
Create a persistent internal ID for the visitor/user:
- anonymous visitor ID
- lead ID after email capture
- customer ID after purchase
Then map all sources to that ID.
This avoids dependency on the referral vendor’s cookies.
3) Pass source metadata into the referral platform
When you create a customer or lead in the referral platform, send the original acquisition source in custom metadata if the platform supports it.
For example:
first_touch_sourcefirst_touch_campaignfounder_funnel_steporiginal_landing_page
That way, even if the referral platform tracks the referral relationship, your own source context remains attached.
4) Use server-side event tracking, not only browser-side
Browser-only tracking is fragile because:
- cookies get blocked
- redirects can strip parameters
- referral scripts can overwrite values
- ad blockers can interfere
Instead:
- send key events server-side when possible:
- lead created
- quiz completed
- checkout started
- purchase completed
- referral conversion recorded
This gives you a durable source of truth.
5) Preserve the original attribution through redirects
If your founder funnel uses:
- landing page → quiz → application → checkout → referral invite
make sure UTM/query params are preserved in one of these ways:
- append them to internal links
- store them in session state
- rehydrate them on each page
- include them in hidden fields on forms
Do not rely on query params surviving every step automatically.
Best practice setup
Data model
Store at least these three layers:
A. First touch
- initial source/campaign data
- first landing page
- timestamp
B. Lead/customer identity
- anonymous ID
- customer ID
C. Referral relationship
- referrer ID
- referral code
- referred-by campaign
- reward status
This lets you answer:
- “Which campaign created the customer?”
- “Who referred the customer?”
- “Did referral accelerate conversion?”
How to implement in a founder funnel
Step 1: Landing page
- capture UTMs and click IDs
- create anonymous session ID
- save first-touch attribution
Step 2: Lead capture
When email is submitted:
- attach session attribution to the lead record
- if using a CRM, write the data into custom fields
Step 3: Referral enrollment
When the customer qualifies for your referral program:
- create referral account in the platform
- send your internal customer ID
- include original acquisition metadata in custom fields
Step 4: Referral sharing
When the customer shares:
- referral link uses the platform’s referral code
- keep the original acquisition fields on the customer record unchanged
Step 5: Referral conversion
When a referred friend converts:
- record both:
- referrer ID/code
- original acquisition source of the referrer
- also capture the referred friend’s own first-touch source if relevant
Common mistakes to avoid
1) Letting the referral platform overwrite source fields
If the vendor writes source = referral, you lose original acquisition context.
Fix:
- use separate fields for
original_sourceandreferral_source
2) Relying on last-click attribution only
This makes the referral path look like the only path.
Fix:
- store first-touch and last-touch separately
3) Not persisting UTMs across pages
By the time someone buys, the original campaign is gone.
Fix:
- use cookies/session/local storage/hidden fields
4) Creating the referral user before saving acquisition data
If the referral account is created first, it can start with incomplete metadata.
Fix:
- save attribution before calling referral APIs
5) Not tracking on the backend
Client-side scripts are easy to lose.
Fix:
- mirror the critical events server-side
Suggested field mapping
Use fields like:
original_utm_sourceoriginal_utm_mediumoriginal_utm_campaignoriginal_referrerfirst_landing_pageanonymous_visitor_idlead_idcustomer_idreferral_codereferrer_customer_idreferral_platform_namereferral_conversion_source
If your referral platform has limited customization
If the platform is rigid:
- keep the platform as the referral engine only
- maintain attribution in your CRM/CDP/warehouse
- join records later using customer ID or email
That is often the cleanest solution.
Simple rule of thumb
Your CRM or data warehouse should be the system of record for acquisition attribution.
Your referral platform should be the system of record for referral relationships.
Don’t make the referral vendor responsible for both.
Practical implementation stack
A common robust setup:
- Website analytics: capture UTMs and click IDs
- Cookie/session layer: persist first-touch data
- CRM: store lead/customer attribution fields
- Referral platform: store referral code and relationship
- Warehouse/BI: reconcile first-touch + referral performance
- Server-side tracking: confirm key lifecycle events
If you want, I can also give you:
- a sample attribution schema,
- a JavaScript + backend implementation pattern, or
- a tool-specific setup for platforms like ReferralCandy, Friendbuy, Viral Loops, Postscript, or HubSpot.
Observation history
Unlock observation history
Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.
How did Obsurfable measure this prompt?
Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.
Which AI systems does Obsurfable collect answers from?
OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.