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;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //PUT YOUR MIXPANEL TOKEN AND SECRET BELOW: | |
| const credentials = { | |
| "token": "your-mixpanel-token-here", | |
| "secret": "your-mixpanel-secret-here" | |
| } | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # reload all EVENTS from one project to another | |
| # environment variables | |
| # CUSTOMIZE THESE π | |
| export START=2023-01-01 | |
| export END=2023-05-31 | |
| export SOURCE_SECRET=my-source-project-secret | |
| export TARGET_SECRET=my-target-project-secret | |
| # export β import |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @fileoverview Mixpanel Heartbeat API Extension | |
| * | |
| * Augments Mixpanel SDK with heartbeat() functionality for event aggregation. | |
| * Useful for tracking continuous activities like video/audio playback, reading progress, etc... | |
| * This API aggregates small events into summary events before sending to Mixpanel | |
| * | |
| * @author AK: ak@mixpanel.com | |
| * @version 1.0.1 | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <events> | |
| <event> | |
| <timestamp>2025-02-06T12:34:56Z</timestamp> | |
| <user_id>12345</user_id> | |
| <event_id>c1d2e3f4-5678-9101-1121-314151617181</event_id> | |
| <event_type>click</event_type> | |
| <page_url>https://example.com/home</page_url> | |
| <duration>5.3</duration> | |
| <is_logged_in>true</is_logged_in> |
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 16 columns, instead of 7 in line 5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| event_id,timestamp,user_id,event_type,page_url,time_spent_seconds,is_mobile,referrer,click_coordinates,items_in_cart,user_agent,browser_language,is_ad_blocker_enabled,favorite_colors,notes,is_conversion | |
| 1,2023-10-01T12:34:56Z,101,page_view,https://example.com/home,45,TRUE,https://google.com,"-1,024,768",3,Mozilla/5.0 (Windows NT 10.0; Win64; x64),en-US,TRUE,"blue,green",User loves cats.,FALSE | |
| 2,2023-10-01T12:35:10Z,102,click,https://example.com/products,10,FALSE,https://bing.com,"-800,600",,Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7),en-GB,FALSE,"red,orange",,TRUE | |
| 3,2023-10-01T12:36:22Z,103,add_to_cart,https://example.com/product/123,30,TRUE,https://yahoo.com,"-12,801,024",1,Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X),fr-FR,TRUE,"purple,yellow",User left a funny comment.,FALSE | |
| 4,2023-10-01T12:37:45Z,104,page_view,https://example.com/about,120,FALSE,,,,Mozilla/5.0 (Linux; Android 10; SM-G975F),de-DE,FALSE,"black,white",,FALSE | |
| 5,2023-10-01T12:38:50Z,105,purchase,https://example.com/checkout,60,TR |
Snowplow is a state-of-the-art data collection platform which advocates for self-describing-objects. This means that events (rows) that travel through Snowplow's pipeline have a highly nested and hierarchical structure:
{
"event": "user_transaction",
"time": 1730592005,
"APP_ID": "Match-Masters",
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"origRow": 1, "foo":42,"bar":"fortyTwo","myNest":[{"hello":"space","goodbye":"world"},{"hello":"time","goodbye":"gravity"}]} | |
| {"origRow": 2, "foo":420,"bar":"fortyTwenty","myNest":[{"hello":"you","goodbye":"me"},{"hello":"we","goodbye":"thee"}]} |
essentially: bind mixpanel.track() calls to existing Universal Analytics + GA4 implementations without adding new triggers for each event
note: this is experimental... every product's GTM implementation is different... please test this in a sandbox before using in production
Step 1: Install the Mixpanel GTM Template to your GTM container
this module binds all of mixpanel's javascript SDK methods to an object that is native to the GTM container.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- MIXPANEL β AZURE β SNOWFLAKE pipeline | |
| -- the second half... | |
| -- by ak@mixpanel.com | |
| -- docs: https://docs.snowflake.com/en/user-guide/data-load-azure-create-stage | |
| -- create storage integration | |
| CREATE OR REPLACE STORAGE INTEGRATION azure_intergration | |
| TYPE = EXTERNAL_STAGE | |
| STORAGE_PROVIDER = AZURE | |
| ENABLED = TRUE |
NewerOlder
