Recipes

Mixpanel + Segment: Multi-Touch Attribution in Just a Few Clicks

This recipe shares the steps of how to set up Mixpanel as a Segment destination, and how to perform attribution analysis within Mixpanel.

Greg Yeutter

Made by Greg Yeutter

Jessica Jia

Made by Jessica Jia

Tiffany Chen

Made by Tiffany Chen

When marketing across multiple channels, understanding where your users come from is a fundamental part of optimizing your funnel. It’s important to know how much advertising, email, and organic traffic play a role in conversions and engagement. Yet, many businesses struggle with attribution due to fragmented toolsets, traditionally requiring a data science team to build and maintain models. 

Thankfully, the combination of Segment and Mixpanel allows you to generate multi-touch attribution analytics for your data flows with just a few minutes of setup. Segment enables easy instrumentation across web, app, and marketing sources, delivering unified data streams to the Mixpanel destination. Once the data is streamed into Mixpanel, its attribution feature assigns weights to advertising campaigns and organic traffic with either single-touch (first, last) or multi-touch (U-shape, linear, etc.) models.

In this recipe, we’ll demonstrate how to set up Mixpanel as a Segment destination, and how to perform attribution analysis within Mixpanel.

Set Up the Mixpanel Destination

Within your Segment workspace, (1) navigate to Connections in the left sidebar, then (2) click Catalog. (3) Use the search box in the upper right to search for Mixpanel. (4) Click the Mixpanel destination.

1-4 Segment Catalog

(5) Click Add destination in the upper right corner.

5 Add destination

(6) Select a data source, such as your marketing website, then (7) click Next.

6-7 Add Source

(8) Give the destination a name, keep the default settings, and (9) click Create destination.

8-9 Give Name

Within your Mixpanel project, (10) click the Settings icon at the top right, then (11) click Project Settings. (12) Copy the Project Token and API Secret.

10-12 Mixpanel Token

Back in Segment, (13) click the Settings tab of your new Mixpanel destination, then (14) paste the token and secret into the Project Token and Secret Key fields.

13-14 Paste Token

Scroll down, then (15) check the box to Enable the Destination, and (16) click Save Changes. 

15-16 Enable Project

Data should flow into the Mixpanel project within the next few minutes. Within Mixpanel, you can monitor for new events by clicking on the Events tab in the top menu bar. 

Configure Multi-Touch Attribution Within Mixpanel

Once data is flowing into Mixpanel, you can create an attribution analysis in just a few clicks:

1. Create a new Insights report, then select your conversion metric.

MP step 1

2. Head to the Breakdown section and choose the Mixpanel computed property “Attributed by...” 

MP step 2

3. In the second layer that opens up, choose the property you want to breakdown by (eg. UTM Campaign). You can also choose a custom property for the breakdown, such as Marketing channel (typically a combination of UTM medium, UTM source and referrer.)

MP step 3

4. Now you have a working attribution model. By default, Mixpanel will use a Last touch model with a 30 day lookback window. To change the model, head back up to the Metrics section. A variety of models are available, including linear, time-decay, J-shaped, and custom. Experiment with the models to see which one accurately represents your analysis.

MP step 4

5. If you want to exclude certain channels or touchpoints from your attribution analysis, you can filter touchpoints from the breakdown overflow menu. For example, you may want to exclude organic touchpoints from attribution analysis.

MP step 5

Optimize Your Campaigns With Multi-Touch Attribution

Now that you have a working attribution model between Segment and Mixpanel, it’s time to use the information to your advantage. Consider allocating more budget to campaigns that are resulting in conversions or engagement, and deprioritize campaigns that are not contributing as much. With multi-touch attribution, your campaign budgets are finally in your control.

Segment and Mixpanel are a perfect pair for additional analysis, including understanding flows of user activity across channels, sharing user groups between Mixpanel Cohorts and Segment Audiences, and sharing user profile information between the two tools.

Setting up Mixpanel as a Segment Destination only takes a few minutes. Mixpanel is designed to be easy-to-use, so anyone at your firm can run experiments and get insights in a self-serve manner.

Documentation:

Getting started is easy

Start connecting your data with Segment.