Skip to content

Instantly share code, notes, and snippets.

@ak--47
Last active July 28, 2025 16:03
Show Gist options
  • Save ak--47/09854a3b7e03d3a8ca41a5be5bbba841 to your computer and use it in GitHub Desktop.
Save ak--47/09854a3b7e03d3a8ca41a5be5bbba841 to your computer and use it in GitHub Desktop.
Mixpanel + Adobe Data Model Comparisons
graph TD;

    %% ---- Adobe Brand Colors (Enhanced Contrast) ----
    classDef userAction fill:#f8f8f8,stroke:#2D2E2D,color:#2D2E2D,stroke-width:2px;
    classDef serverCall fill:#666,stroke:#2D2E2D,color:#fff,stroke-width:2px;
    classDef hitPacket fill:#ED2224,stroke:#fff,color:#fff,stroke-width:3px;
    classDef warehouse fill:#2D2E2D,stroke:#ED2224,color:#f9f9f9,stroke-width:2px;
    classDef painful fill:#8B0000,stroke:#ED2224,color:#fff,stroke-width:3px;
    classDef titleBg fill:#1a1a1a,stroke:#ED2224,color:#f9f9f9;

    %% ---- 1. User Actions (Clean & Distinct) ----
    subgraph UserActions [" "]
        style UserActions fill:none,stroke:none
        subgraph UserTitle[    ๐ŸŽฏ TWO DISTINCT USER ACTIONS    ]
            style UserTitle fill:#1a1a1a,stroke:#ED2224,color:#f9f9f9
            direction LR
            Action1("๐Ÿ›’<br>Purchase<br>Clicked<br>12:34:18")
            Action2("โœ‰๏ธ<br>Newsletter<br>Signup<br>12:34:24")
        end
    end
    
    %% ---- 2. The Fatal Flaw: Bundling ----
    subgraph BundleSection [" "]
        style BundleSection fill:none,stroke:none
        Action1 & Action2 --> invisible( );
        style invisible fill:none,stroke:none;
        invisible --> |โŒ FATAL FLAW: All actions bundled| ServerCall("๐Ÿ“ก<br>Single Hit<br>to Adobe");
        
        subgraph BundleTitle[&nbsp;&nbsp;&nbsp;&nbsp;โš ๏ธ THE BUNDLING PROBLEM&nbsp;&nbsp;&nbsp;&nbsp;]
            style BundleTitle fill:#1a1a1a,stroke:#ED2224,color:#f9f9f9
            ServerCall --> HitData["
                ๐Ÿ”’ **LOCKED IN ONE TIMESTAMP**<br><br>
                hit_time_gmt: 1734567858<br>
                page_name: 'confirmation'<br>
                eVar5: 'ABC-123' (Product)<br>
                eVar12: 'SummerSale' (Campaign)<br>
                event_list: 'purchase,event27'<br><br>
                โŒ **NO WAY TO SEPARATE ACTIONS**
            "];
        end
    end

    %% ---- 3. Rigid Storage ----
    subgraph StorageSection [" "]
        style StorageSection fill:none,stroke:none
        HitData --> Storage{๐Ÿ“ฆ Data Warehouse};
        subgraph StorageTitle[&nbsp;&nbsp;&nbsp;&nbsp;๐Ÿ—๏ธ RIGID PRE-BUILT SCHEMA&nbsp;&nbsp;&nbsp;&nbsp;]
            style StorageTitle fill:#1a1a1a,stroke:#ED2224,color:#f9f9f9
            Storage --> FactTable("Fact Table: Hits<br>๐Ÿ“Š ONE ROW PER HIT")
            FactTable --> Dim1("eVar5 Dimension<br>๐Ÿท๏ธ Product Data")
            FactTable --> Dim2("eVar12 Dimension<br>๐Ÿท๏ธ Campaign Data") 
            FactTable --> Dim3("โ“ event27 Dimension<br>๐Ÿคท Unknown Purpose")
        end
    end
    
    %% ---- 4. The Painful Reality ----
    subgraph PainSection [" "]
        style PainSection fill:none,stroke:none
        Dim1 & Dim2 & Dim3 --> PainPoints;
        subgraph PainTitle[&nbsp;&nbsp;&nbsp;&nbsp;๐Ÿ’€ PAINFUL LIMITATIONS IN 2025&nbsp;&nbsp;&nbsp;&nbsp;]
            style PainTitle fill:#1a1a1a,stroke:#ED2224,color:#f9f9f9
            PainPoints["๐Ÿšซ IMPOSSIBLE IN ENTERPRISE 2025:<br><br>โ“ Which promo drove this purchase?<br>   eVar expired, attribution lost<br><br>โ“ Cross-platform customer journey?<br>   Separate silos, no unification<br><br>โ“ Item-level attribution tracking?<br>   Merchandising eVars complex setup<br><br>โ“ Retroactive cohort analysis?<br>   Impossible - data locked at collection<br><br>โ“ Dynamic session definitions?<br>   Client-side logic cannot change history<br><br>๐Ÿ’ธ BUSINESS IMPACT:<br>   Marketing ROI unmeasurable<br>   Customer experience fragmented<br>   Data team bottlenecked on eVar mgmt"];
        end
    end

    %% ---- Apply Enhanced Styling ----
    class UserTitle,BundleTitle,StorageTitle,PainTitle titleBg;
    class Action1,Action2 userAction;
    class ServerCall serverCall;
    class HitData hitPacket;
    class Storage,FactTable,Dim1,Dim2,Dim3 warehouse;
    class PainPoints painful;
Loading
graph TD;

    %% ---- Mixpanel Brand Colors (Enhanced) ----
    classDef userAction fill:#E0FAFA,stroke:#7856FF,color:#0a101a,stroke-width:2px;
    classDef eventStream fill:#1A2433,stroke:#7856FF,color:#E0FAFA,stroke-width:3px;
    classDef queryEngine fill:#07B096,stroke:#80E1D9,color:#0a101a,stroke-width:3px;
    classDef enrichment fill:#1A2433,stroke:#80E1D9,color:#E0FAFA,stroke-width:2px;
    classDef superpower fill:#7856FF,stroke:#F8BC3B,color:#E0FAFA,stroke-width:4px;
    classDef titleDark fill:#0a101a,stroke:#7856FF,color:#E0FAFA;

    %% ---- 1. Same User Actions (But Better Handling) ----
    subgraph UserSection [" "]
        style UserSection fill:none,stroke:none
        subgraph UserTitle[๐ŸŽฏ SAME TWO USER ACTIONS]
            style UserTitle fill:#0a101a,stroke:#7856FF,color:#E0FAFA
            direction LR
            Action1("๐Ÿ›’<br>Purchase<br>Clicked<br>12:34:18")
            Action2("โœ‰๏ธ<br>Newsletter<br>Signup<br>12:34:24")
        end
    end
    
    %% ---- 2. Individual Event Streams ----
    subgraph EventSection [" "]
        style EventSection fill:none,stroke:none
        subgraph EventTitle[โšก ATOMIC EVENT CAPTURE]
            style EventTitle fill:#0a101a,stroke:#7856FF,color:#E0FAFA
            direction TB
            Action1 --> Event1["
                โœจ **'Product Purchased'**<br>
                ๐Ÿ• time: 1734567858<br>
                ๐Ÿ‘ค distinct_id: 'user-xyz'<br><br>
                ๐Ÿ“Š **properties**:<br>
                โ€ข product_sku: 'ABC-123'<br>
                โ€ข price: 99.99<br>
                โ€ข campaign: 'SummerSale'<br>
                โ€ข discount_code: 'SAVE20'
            "]
            
            Action2 --> Event2["
                โœจ **'Newsletter Signup'**<br>
                ๐Ÿ• time: 1734567864<br>
                ๐Ÿ‘ค distinct_id: 'user-xyz'<br><br>
                ๐Ÿ“Š **properties**:<br>
                โ€ข source: 'Confirmation Page'<br>
                โ€ข campaign: 'SummerSale'<br>
                โ€ข list_type: 'Weekly Updates'
            "]
        end
    end

    %% ---- 3. Live Query Intelligence ----
    subgraph QuerySection [" "]
        style QuerySection fill:none,stroke:none
        Event1 & Event2 --> QueryEngine("๐Ÿง <br>LIVE QUERY<br>ENGINE");
        
        subgraph QueryTitle[๐Ÿš€ QUERY-TIME INTELLIGENCE]
            style QueryTitle fill:#0a101a,stroke:#7856FF,color:#E0FAFA
            direction LR
            
            UserProfile["
                ๐Ÿ‘ค **User Profile (Cross-Device)**<br>
                loyalty_tier: 'Gold'<br>
                first_purchase: '2023-12-01'<br>
                lifetime_orders: 47<br>
                preferred_location: 'Downtown'<br>
                **๐Ÿ”„ Retroactive Enrichment**
            "]
            
            GroupProfile["
                ๐Ÿข **Behavioral Cohorts**<br>
                'Heavy App Users'<br>
                'Promo Sensitive Customers'<br>
                'First Time Feature Users'<br>
                **๐Ÿ“Š Dynamic Query-Time**
            "]
            
            LookupTable["
                ๐Ÿ“Š **Attribution Models**<br>
                Multi-touch: Time Decay<br>
                Hold Constant: product_id<br>
                Session Props: utm_campaign<br>
                **โšก No Pre-Config Needed**
            "]
            
            QueryEngine -.-> |Borrows Properties| UserProfile;
            QueryEngine -.-> |Enriches with| GroupProfile;
            QueryEngine -.-> |Joins with| LookupTable;
        end
    end
    
    %% ---- 4. Advanced Analytics Superpowers ----
    subgraph SuperSection [" "]
        style SuperSection fill:none,stroke:none
        QueryEngine --> SuperPowers;
        
        subgraph SuperTitle[๐ŸŽช ANALYTICS SUPERPOWERS UNLOCKED]
            style SuperTitle fill:#0a101a,stroke:#7856FF,color:#E0FAFA
            SuperPowers["
                ๐Ÿ”ฎ **RETROACTIVE ANALYSIS:**<br>
                โœ… Aug 15 push notification โ†’ Aug 16 purchase<br>
                โœ… Analyze 2023 events with 2025 user profiles<br><br>
                
                ๐ŸŽฏ **CROSS-PLATFORM ATTRIBUTION:**<br>
                โœ… Email โ†’ App โ†’ Kiosk โ†’ Purchase journey<br>
                โœ… Unified customer identity across touchpoints<br><br>
                
                ๐Ÿ›’ **HOLD PROPERTY CONSTANT:**<br>
                โœ… Item X: Promo View โ†’ Add Cart โ†’ Purchase<br>
                โœ… Per-item attribution without complex setup<br><br>
                
                ๐Ÿง  **BEHAVIORAL COHORTS:**<br>
                โœ… Users who never used Feature Y (dynamic)<br>
                โœ… First-time users of Feature Z (query-time)<br><br>
                
                ๐Ÿ“Š **MULTI-TOUCH ATTRIBUTION:**<br>
                โœ… Time decay, participation, linear models<br>
                โœ… Campaign influence across 100+ touchpoints<br><br>
                
                โšก **QUERY-TIME FLEXIBILITY:**<br>
                โœ… Redefine sessions retroactively<br>
                โœ… Custom attribution windows on-demand<br>
                โœ… Zero implementation planning required
            "];
        end
    end

    %% ---- Apply Enhanced Styling ----
    class UserTitle,EventTitle,QueryTitle,SuperTitle titleDark;
    class Action1,Action2 userAction;
    class Event1,Event2 eventStream;
    class QueryEngine queryEngine;
    class UserProfile,GroupProfile,LookupTable enrichment;
    class SuperPowers superpower;
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment