# Mixpanel

## Enable the integration

* Navigate to [our integrations page](https://i.usejimo.com/settings/integrations)
* Click the Connect button of the Mixpanel integration

<div align="left"><figure><img src="https://i.gyazo.com/bb135f45fe28c35c805229a420d215b4.png" alt="" width="375"><figcaption><p>Mixpanel integration</p></figcaption></figure></div>

## Jimo → Mixpanel

{% hint style="info" %}
**Requirements**

The Mixpanel Javascript SDK needs to be injected and used in your application for this to work.
{% endhint %}

Send Jimo events to Mixpanel. This setup would allow you to capture a comprehensive view of user engagement across your platform. By funneling events from Jimo into Mixpanel, you can leverage Mixpanel's powerful analytics tools to track, visualize, and analyze user interactions, helping you to better understand user behavior and refine user experience strategies based on actionable insights. This connection ensures that all relevant user activity within Jimo is seamlessly integrated into Mixpanel's analytical environment.

<figure><img src="https://i.gyazo.com/66209788efefb0827ea979ac11be82f2.png" alt=""><figcaption><p>Visualize and create analytics dashboard based on Jimo events in Mixpanel</p></figcaption></figure>

You can find a list of possible events and their properties

{% content-ref url="events-for-analytics-integrations" %}
[events-for-analytics-integrations](https://help.usejimo.com/docs/integrations/events-for-analytics-integrations)
{% endcontent-ref %}

#### How to enable?

* Enable the option *Jimo → Mixpanel* in the integration settings

<figure><img src="https://i.gyazo.com/f531fdebdd157ff632beff8824af4bef.png" alt=""><figcaption><p>Enable Jimo → Mixpanel</p></figcaption></figure>

{% hint style="success" %}
You are all setup 🎉
{% endhint %}

## Mixpanel → Jimo

Send Mixpanel events to Jimo. This setup enables the utilization of Mixpanel's events within Jimo targeting audiences, specifically for the "Who" section (targeting specific user segments) and creation of Segment of users. This ensures that Jimo's engagements are deeply personalized, enhancing user interaction based on precise analytical insights from Mixpanel.

<figure><img src="https://i.gyazo.com/dc2c3ee3dea4418a05a537983b179610.png" alt=""><figcaption><p>Create audience based on Mixpanel events</p></figcaption></figure>

#### How to enable?

* Enable the option *Mixpanel → Jimo* in the integration settings

<figure><img src="https://i.gyazo.com/e1b2689c783e26ccbcb1377ff25be35b.png" alt=""><figcaption><p>Enable Mixpanel → Jimo</p></figcaption></figure>

* Add the following code in your application

```javascript
/**
  Numerous organizations employing Mixpanel for event tracking generally maintain
  a universally accessible function for capturing these events.
  
  The easiest method to ensure all these events are also recorded in Jimo
  is by integrating a mixpanel:track call from the Jimo SDK into this existing function.
  This technique guarantees the simultaneous capture of events across both platforms.
*/

// Create a universal function
const trackEvent = (name, properties) => {
  window.mixpanel.track(name, properties); // You should have this already
  
  window.jimo.push(["do", "mixpanel:track", [name, properties]]);
};

// Let's use it
trackEvent("purchase", { amount: 199 })
```

{% hint style="success" %}
You are all setup 🎉
{% endhint %}

## Trigger an experience from a Mixpanel event

To display an experience following a Mixpanel event in your application, go to the **Settings** page of the experience, set the trigger to '**On event**,' and select the specific Mixpanel event to use.

<figure><img src="https://i.gyazo.com/fb7a3ba1a4c94ae5fd86700cdf66af6b.png" alt=""><figcaption><p>Set the experience trigger to <strong>On event</strong></p></figcaption></figure>

<figure><img src="https://i.gyazo.com/e9771de92ccb70e646f9228149c22b82.png" alt=""><figcaption><p>Select the Mixpanel event that should trigger the experience</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.usejimo.com/docs/integrations/mixpanel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
