# How to connect Batch to Mixpanel?

As a marketer what you want is a global and cohesive view of your entire traffic sources & marketing campaigns inside your analytics suite. Without having to compromise on your effective working habits.

Using the Batch x Mixpanel integration lets you track your entire push notifications and in-app messaging inbound traffic sources inside Mixpanel like you would with any other traffic source.

{% stepper %}
{% step %}

### &#x20;Installing the Mixpanel Dispatcher in Your Application <a href="#id-1-installing-the-mixpanel-dispatcher-in-your-application" id="id-1-installing-the-mixpanel-dispatcher-in-your-application"></a>

The Mixpanel dispatcher uses the [UTM tags](https://ga-dev-tools.appspot.com/campaign-url-builder/) from your campaign to dispatch a new set of data to Mixpanel.

Once the dispatcher is installed, you will be able to track [different types of events](https://doc.batch.com/developer/sdk/ios/event-dispatchers#access-data-from-the-event) related to your push or In-App messaging campaigns on Mixpanel.

If you haven't already installed the Mixpanel event dispatcher, please read our technical documentation for [Android](https://doc.batch.com/developer/sdk/android/event-dispatchers#mixpanel) and [iOS](https://doc.batch.com/developer/sdk/ios/event-dispatchers#mixpanel).
{% endstep %}

{% step %}

### Tracking your campaigns with UTM tags

### a. Tracking a push campaign with a UTM tag <a href="#id-2a-tracking-a-push-campaign-with-a-utm-tag" id="id-2a-tracking-a-push-campaign-with-a-utm-tag"></a>

The dispatcher gathers the values of utm\_campaign, utm\_source and utm\_medium from the deeplink URL and from the custom payload of your campaign.

The tags utm\_source and utm\_medium are optional because they have a default value of batch and push accordingly.

You can add utm\_content only in the deeplink URL in case your push notification has several different buttons.

<figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2F9xGYrUrpUMThRWGxHj1n%2FCapture.png?alt=media&#x26;token=65e27687-be0f-40fe-b4e1-d29ca1b5d3b5" alt="Adding UTM Tags in a push notification"><figcaption><p>Adding UTM Tags in a push notification</p></figcaption></figure>

### b. Tracking an In-App Campaign or Mobile Landings <a href="#id-2b-tracking-an-in-app-campaign-or-mobile-landings" id="id-2b-tracking-an-in-app-campaign-or-mobile-landings"></a>

{% hint style="info" %}
This feature is specific to Batch's Mobile Engagement Platform (More on the [difference between Batch's CEP and MEP](https://app.gitbook.com/s/UIK868wiiK9XOVyETGZS/other/faq/what-are-the-differences-between-batch-customer-engagement-platform-and-mobile-engagement-platform)).
{% endhint %}

The dispatcher gathers the value of utm\_campaign from the field Tracking ID of your campaign.

You can't customize the $source and utm\_medium tags, they have a value of batch and in-app accordingly.

You can add utm\_content only in the deeplink URL in case your in-app message has two different buttons.

<figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2FQHOmEPJaaEYMcheHw51m%2FAnalytics_GA_TrackingInAppMobileLanding_17042025.png?alt=media&#x26;token=0d24bbc9-42e6-4406-8c0b-d007185608fc" alt="Adding UTM Tags in an InApp"><figcaption><p>Adding UTM Tags in an InApp</p></figcaption></figure>
{% endstep %}

{% step %}

### Testing your campaign tracking <a href="#id-3-testing-your-campaign-tracking" id="id-3-testing-your-campaign-tracking"></a>

The Live View section of the Mixpanel dashboard allows you to see all events tracked.

You can test the following events :

* Push notification displayed: Triggered when a push notification is displayed (only available on Android).
* Push notification clicked: Triggered when a push notification is clicked.
* Push notification dismissed: Triggered when a push notification is dismissed (only available on Android).
* Message showed: Triggered when an in-app or landing message appears on the screen.
* Message closed: Triggered when an in-app or landing message is explicitly closed by the user (using the close button or a dismiss CTA/Global tap).
* Message auto-closed: Triggered when an in-app or landing message is closed by the auto-close timer.
* Message clicked: Triggered when an in-app or landing Click-To-Action is clicked or when the in-app/landing is global tapped (except if the CTA/Global Tap is a dismiss, then a closed event is triggered).

<figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2FiCyILY9aizM1rGHBk8yh%2FAnalytics_Mixpanel_Testing_30042025.png?alt=media&#x26;token=4ce58f77-01c0-423c-a10e-172e3b615fe8" alt="Testing with the Live View section"><figcaption><p>Testing with the Live View section</p></figcaption></figure>
{% endstep %}
{% endstepper %}
