Case 10: November 20th Sales Investigation
Case 10: Real-World Attribution Analysis: November 20th Sales Investigation
Section titled “Case 10: Real-World Attribution Analysis: November 20th Sales Investigation”The Question
Section titled “The Question”“What happened on November 20th?”
The Goal
Section titled “The Goal”Understand which traffic sources drove sales that day
Time to Answer
Section titled “Time to Answer”~1 minute
Step 1: Pull Sales Event Data
Section titled “Step 1: Pull Sales Event Data”Action
Section titled “Action”Query sales events for November 20th from Moon
What you get (spreadsheet/database export)
Section titled “What you get (spreadsheet/database export)”| User ID | Affid | Source | Campaign Type | Campaign ID | Parameters |
|---|---|---|---|---|---|
| 019a974d0bb877f19905e4e10c3d5892 | - | google ads | g_campaignid | 22740491004 | {“_gl”:“1*19k±…“} |
| 019aa24361a57f03928122b309e186f6 | 1000 | fb | campaign_id | 120236311971890504 | {“_gl”:“1*17a±…“} |
| 019aa212fd9773b4b6babfb8d9cdface | 1000 | fb | campaign_id | 120233281060520682 | {“_gl”:“1*1uz±…“} |
| 019a9fc799fa7192b394c5fc08e2d417 | - | test | - | - | {“content_ids…} |
| 019aa0d1753f7376bd630c614ee55c00 | - | test | - | - | {“affid”:"",“co…} |
| 019a9f55a76a7fd988c6401a79f751a2 | 1001 | google_ads | ad_id | 781 | {“ad_id”:“781…} |
| 019aa0bc82b375a3b1f02bf4983328a9 | - | test | - | - | {“_gl”:“1*1e4…} |
| 019a9edc73fb7d6a8b921122171e0bcf | 1001 | google_ads | - | - | {“_gl”:“1*16a…} |
| 019aa0fffce8710fa99a2c0a9affe962 | - | test | - | - | {“affid”:"",“co…} |
| 019aa1f79f9277088d50e7c54eb10eba | - | mega-funnel | - | - | {“affid”:"",“co…} |
| bceb8c64219a4188bb78bf144f20363c | - | email_crm | direct-crm-ticket | - | {“_gl”:“1*ve7c…} |
Time elapsed: 1 minute to export this data
Step 2: Analyze the Attribution
Section titled “Step 2: Analyze the Attribution”Immediate insights from the data
Section titled “Immediate insights from the data”Traffic Source Breakdown:
- Facebook (affid 1000): 2 sales - campaigns 120236311971890504, 120233281060520682
- Google Ads (affid 1001): 2 sales - properly tracked with affid
- Google Ads (no affid): 1 sale - missing affid but has Google campaign parameters (g_campaignid: 22740491004)
- Test traffic: 4 sales - obvious from specific IDs and “test” source label
- Email/CRM: 1 sale - from direct-crm-ticket (email_crm source)
- Mega-funnel: 1 sale - from alternative funnel
- SMS: Hidden in the data (discovered by parameter analysis)
Step 3: Deep Dive - Parameter Investigation
Section titled “Step 3: Deep Dive - Parameter Investigation”The “Google ads” sale without affid (row 1)
Section titled “The “Google ads” sale without affid (row 1)”- Source shows:
google ads - Affid: empty
- But parameters show:
{"_gl":"1*19k±...}
Look deeper into parameters → Find SMS prospect tracking codes
Actual source: SMS retargeting (not Google Ads)
- User originally came from Google Ads (stored in their profile)
- Was retargeted via SMS
- Clicked SMS link and purchased
- Parameters reveal the SMS tracking codes
- Original attribution: Google Ads campaign
This is why parameters are the “attribution Bible” → They reveal the true story
The Parameter Deep Dive
Section titled “The Parameter Deep Dive”Every sale has parameters - JSON object with tracking data
Section titled “Every sale has parameters - JSON object with tracking data”Facebook sale parameters:
{ "_gl": "1*17a±...", "utm_source": "fb", "utm_medium": "cpc", "campaign_id": "120236311971890504", "ad_id": "120233281654680682", "adset_id": "120233281060550682", "affid": "1000", "fbp": "fb.1.1764081009618..."}Email/CRM sale parameters:
{ "_gl": "1*ve7c...", "source": "email_crm", "campaign": "direct-crm-ticket", "email_id": "msg_abc123", "original_utm_source": "fb", "original_campaign_id": "120236311971890504"}SMS sale parameters (disguised as Google Ads):
{ "_gl": "1*19k±...", "sms_campaign": "sms_prospect_nov_20", "sms_message_id": "msg_sms_xyz", "original_utm_source": "google", "original_campaign_id": "22740491004"}These parameters reveal
Section titled “These parameters reveal”- Original traffic source (first-touch)
- Current traffic source (last-touch)
- Campaign identifiers
- Ad identifiers
- Email/SMS identifiers
- All tracking codes
Without reading parameters, you’d think: “This is a Google Ads sale”
With parameters, you discover: “This is an SMS retargeting sale, originally from Google Ads”
Multiple Events Per Sale
Section titled “Multiple Events Per Sale”Each sale has at least 3 events in the system
Section titled “Each sale has at least 3 events in the system”Event 1: Landing (Day 1)
{ "event": "conv_landing_page_view", "user_id": "019a974d0bb877f19905e4e10c3d5892", "timestamp": "2025-11-18T10:23:45Z", "parameters": { "utm_source": "google", "utm_campaign": "weight-loss-q4", "campaign_id": "22740491004", "landing_page": "/medication-tirzepatide-discount-01" }}Event 2: Lead Capture (Day 1, 15 minutes later)
{ "event": "achieve_screen_viewed", "user_id": "019a974d0bb877f19905e4e10c3d5892", "timestamp": "2025-11-18T10:38:22Z", "properties": { "email": "user@example.com", "phone": "+1-555-0123" }, "parameters": { "utm_source": "google", "campaign_id": "22740491004" }}Event 3: Sale (Day 3, via SMS retargeting)
{ "event": "purchase_completed", "user_id": "019a974d0bb877f19905e4e10c3d5892", "timestamp": "2025-11-20T14:52:33Z", "properties": { "email": "user@example.com", "amount": 499, "transaction_id": "txn_abc123" }, "parameters": { "utm_source": "google", // Original source (preserved) "campaign_id": "22740491004", // Original campaign "sms_campaign": "sms_prospect_nov_20", // Last-touch "sms_message_id": "msg_sms_xyz" }}All 3 events share the same user_id → Connected journey
This enables multi-touch attribution: You can see the full path from landing → lead → sale
Understanding the “Footprints”
Section titled “Understanding the “Footprints””Every event has a schema - the JSON structure with all parameters
Section titled “Every event has a schema - the JSON structure with all parameters”PostHog event schema:
user_id(or distinct_id)event(event name)timestampproperties(event-specific data)$set(user properties)utm_source,utm_medium,utm_campaign, etc.- Custom parameters (campaign_id, ad_id, affid, etc.)
Your marketing events have their footprints
Section titled “Your marketing events have their footprints”- Facebook ads:
campaign_id,ad_id,adset_id,affid,fbp - Google Ads:
gclid,campaign_id,g_campaignid - Email:
email_id,campaign,source: email_crm - SMS:
sms_campaign,sms_message_id - Organic:
utm_source: organic, referrer data
These footprints are how you see things - the ONLY way you see things.
If you don’t understand the footprints
Section titled “If you don’t understand the footprints”- You can’t read the data correctly
- You’ll misattribute sales (thinking SMS = Google Ads)
- You’ll miss patterns
- You’re “a bad hunter”
The Practical Workflow
Section titled “The Practical Workflow”No meetings needed. No complex analysis. Just
Section titled “No meetings needed. No complex analysis. Just”- Notice what IDs exist: “Oh, we have PostHog IDs. Fine.”
- See what parameters are captured: “We have affid, campaign_id, utm_source. Cool.”
- Use them: Query by these fields, segment by them, attribute by them
- Done: Takes 1 minute to pull sales attribution
This isn’t magical
Section titled “This isn’t magical”- The system stores parameters on every event
- Parameters persist through the funnel
- Query pulls parameters with sales data
- You read the parameters to understand attribution
Common pattern
Section titled “Common pattern”- See PostHog tracking → Know you have user IDs and events
- See affid field → Know you can segment by traffic source
- See campaign_id → Know you can attribute to campaigns
- Just use what’s there
No need to overthink it - if the parameter exists, use it.
Key Insights from the November 20th Analysis
Section titled “Key Insights from the November 20th Analysis”Traffic Sources Driving Sales
Section titled “Traffic Sources Driving Sales”- Facebook (affid 1000): 2 sales
- Google Ads (affid 1001): 2 sales
- Email/CRM retargeting: 1 sale
- SMS retargeting: 1 sale (discovered via parameters)
- Test traffic: 4 sales (internal testing)
- Alternative funnel: 1 sale
Retargeting Impact
Section titled “Retargeting Impact”- Multiple sales came via email/SMS retargeting
- But all attributed back to original paid campaigns
- Parameters reveal both original and last-touch sources
Parameter Reading Reveals Hidden Patterns
Section titled “Parameter Reading Reveals Hidden Patterns”- One “Google Ads” sale was actually SMS
- Email sales traced back to original Facebook campaign
- Multi-touch journey visible through parameter history
Principles Applied
Section titled “Principles Applied”- End-to-End Attribution is Non-Negotiable ✓
- PII is the Attribution Anchor ✓ (email connects events)
- First-Touch Attribution is Sacred ✓ (parameters preserve original source)
- Know What You Want to Check ✓ (understand event schema)
- Understand Your Event Footprints (Schema) ✓
- Parameters Reveal the Truth ✓
Tool Features That Enable This
Section titled “Tool Features That Enable This”- Event export with all parameters
- User ID linking across events (landing → lead → sale)
- Parameter preservation through funnel
- JSON parameter storage (flexible schema)
- Multi-touch tracking (original + current source)
- Fast querying (1 minute to answer “what happened on Nov 20?”)
The Bottom Line
Section titled “The Bottom Line”With properly instrumented events and parameter tracking, you can answer complex attribution questions in minutes, not days. Just understand your data schema and use it.
Navigation
Section titled “Navigation”- Previous: Case 9: Multi-Touch Attribution
- Next: Case 11: Cross-Validating Attribution
- Back to Index: All Cases