# Mixpanel (v1)

Information note **Mixpanel extraction is supported by Stitch**   
This integration is powered by [Singer's](https://www.singer.io/) Mixpanel tap and certified by Stitch. [Check out and contribute to the repo on GitHub](https://github.com/singer-io/tap-mixpanel).  
  
For support, contact [Support](https://community.qlik.com/t5/Support/ct-p/qlikSupport).

## Mixpanel integration summary

Stitch’s Mixpanel integration replicates data using the [Mixpanel Event Export API and Mixpanel Query API](https://developer.mixpanel.com/docs/mixpanel-apis). Refer to the [Schema](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#schema) section for a list of objects available for replication.

## Mixpanel feature snapshot

A high-level look at Stitch's Mixpanel (v1) integration, including release status, useful links, and the features supported in Stitch.

| **STITCH** |  |  |  |
| --- | --- | --- | --- |
| **[Release status](https://help.qlik.com/en-US/stitch/integrations/identify-an-integration-version)** | Released on June 2, 2020 | **Supported by**<br><br>the Info icon<br><br>Indicates if the integration is supported by Stitch or the Singer community. | [Stitch](https://community.qlik.com/t5/Support/ct-p/qlikSupport) |
| **Stitch plan**<br><br>the Info icon<br><br>The type of Stitch plan required to use the integration. | Standard | **[API availability](https://help.qlik.com/en-US/stitch/developers/stitch-connect/guides/source-destination-reference)**<br><br>the Info icon<br><br>Indicates if the integration is available as a source in Stitch Connect. | the Success icon<br><br>This version of the integration is available via the API.<br><br><br>Available |
| **Singer GitHub repository** | [singer-io/tap-mixpanel](https://github.com/singer-io/tap-mixpanel) |  |  |
| **REPLICATION SETTINGS** |  |  |  |
| **[Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling where an integration's Replication Frequency is anchored to a time you select. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Advanced Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling)**<br><br>the Info icon<br><br>A type of replication scheduling that allows you to specify granular start times for data extraction using cron expressions. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **Table-level reset**<br><br>the Info icon<br><br>Indicates if data can be reset at the table level. If unsupported, data can only be reset at the integration level. | the Remove icon<br><br>Table-level resets are not supported for this integration. Resets are only supported at the integration level.<br><br><br>Unsupported | **[Configurable Replication Methods](https://help.qlik.com/en-US/stitch/replication/replication-methods)**<br><br>the Info icon<br><br>Indicates if Replication Methods can be defined by you for tables in the integration. | the Remove icon<br><br>Configurable Replication Methods are not supported for this integration. Stitch will use pre-defined replication methods for tables you set to replicate.<br><br><br>Unsupported |
| **DATA SELECTION** |  |  |  |
| **Table selection**<br><br>the Info icon<br><br>The ability to select individual tables for replication in the Stitch interface. If table selection is unavailable, all tables and all the columns they contain will be set to replicate by default. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **Column selection**<br><br>the Info icon<br><br>The ability to select individual columns for replication in the Stitch interface. If column selection is unavailable, all columns will be set to replicate by default. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |
| **Select all**<br><br>the Info icon<br><br>Indicates if the integration supports selecting all available tables and columns. | the Success icon<br><br>Supported<br><br><br>Supported |  |  |
| **TRANSPARENCY** |  |  |  |
| **[Extraction Logs](https://help.qlik.com/en-US/stitch/replication/extractions/integration-extraction-logs)**<br><br>the Info icon<br><br>Logs detailing the Extraction phase of the replication process for a given integration. Includes error info, should an error occur. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported | **[Loading Reports](https://help.qlik.com/en-US/stitch/replication/integration-loading-reports)**<br><br>the Info icon<br><br>Reports detailing the Loading phase of the replication process for a given integration. Includes the number of rows loaded for each table and error info, should an error occur. | the Success icon<br><br>This feature is supported for this version of the integration.<br><br><br>Supported |

## Connecting Mixpanel

### Mixpanel setup requirements

To set up Mixpanel in Stitch, you need:

* **Admin privileges**. These are required to retrieve your API secret in your Mixpanel account.

### Step 1: Retrieve your Mixpanel project timezone and API secret

1. Login to your Mixpanel account.
2. In the dropdown menu in the upper left corner of the page, select the project you want to replicate data from.
3. Hover over the **Settings** icon in the upper right corner. In the **PROJECT SETTINGS** portion of the dropdown menu, click on the link with the name of your project.
4. Copy the **Project Timezone** and **API Secret**, and paste those values someplace safe to use for the next step.

### Step 2: Add Mixpanel as a Stitch data source

1. [Sign into your Stitch account](https://app.stitchdata.com/).

2. On the Stitch Dashboard page, click the **Add Integration** button.

3. Click the **Mixpanel** icon.

4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

   For example, the name “Stitch Mixpanel” would create a schema called `stitch_mixpanel` in the destination. **Note**: Schema names cannot be changed after you save the integration.

5. In the **API Secret** field, paste the **API Secret** you retrieved from [Step 1](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#retrieve-timezone-api-secret).

6. In the **Attribution Window** field, enter the number of days you want your tables’ attribution window to be. For more information on attribution windows, refer to the [Replication section](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#attribution-windows-extraction).

7. In the **Date Window Size** field, enter the number of days desired for a date looping window for the `exports`, `funnels`, and `revenues` tables.

   Date looping will return records whose `from_date` and `to_date` fall between the number of days in the defined window size.

   **Note**: If your project has large volumes of events, you may want to set the number of days to `14`, `7`, or even to `1` or `2` days.

8. **Optional**: To fetch specific events, enter a comma-separated list of events in the **Export Events** field. For example: `Page Viewed, Signed Up`.

9. In the **Project Timezone** field, paste the **Project Timezone** you retrieved from [Step 1](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#retrieve-timezone-api-secret).

10. **Optional**: To capture new properties automatically in the `events` and `engage` tables, check the **Select Properties By Default** box. Otherwise, new properties will be ignored.

### Step 3:

The Sync Historical Data setting defines the starting date for your Mixpanel integration. This means that data **equal to or newer than this date** will be replicated to your data warehouse.

For a detailed look at historical replication jobs, check out the [Syncing Historical SaaS Data](https://help.qlik.com/en-US/stitch/replication/syncing-historical-saas-data-resetting-replication-keys) guide.

**Note**: Mixpanel limits the number of days historical data may be accessed, depending on your Mixpanel plan. If you select a Start Date greater than what your Mixpanel account has access to, Stitch may encounter issues with Mixpanel’s API.

For example: If you have a Starter Free Mixpanel plan, you have access to 90 days of historical data (as of 06/5/2020). If you select a Start Date greater than 90 days, Mixpanel’s API may return an error.

Additionally, the Start Date must be less than or equal to **365 days**. If a Start Date greater than 365 days is selected, Stitch will reset the Start Date to 365 days during Extraction.

Refer to [Mixpanel’s documentation](https://help.mixpanel.com/hc/en-us/articles/115004511246) for more info and to check your Mixpanel account’s historical data access limit.

### Step 4: Create a replication schedule

Information note Replication schedules affect the time Extraction begins, not the time to data loaded. Refer to the [Replication Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling) documentation for more information.

In the **Replication Frequency** section, you’ll create the integration’s [replication schedule](https://help.qlik.com/en-US/stitch/replication/replication-scheduling). An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

Mixpanel integrations support the following replication scheduling methods:

* [Replication Frequency](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/replication-frequency)

* [Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/anchor-scheduling)

* [Advanced Scheduling using Cron](https://help.qlik.com/en-US/stitch/replication/replication-scheduling/advanced-scheduling) (Advanced or Premium plans only)

To keep your row usage low, consider setting the integration to replicate less frequently. See the [Understanding and Reducing Your Row Usage guide](https://help.qlik.com/en-US/stitch/getting-started/understanding-stitch-usage) for tips on reducing your usage.

### Step 5: Set objects to replicate

Information note **Is an object missing or not replicating?** Verify that the object meets the requirements for [selection](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#selection-requirements) and [replication](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#replication-requirements).

The last step is to select the tables and columns you want to replicate. [Learn about the available tables for this integration.](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#schema)

**Note**: If a replication job is currently in progress, new selections won’t be used until the next job starts.

* Selection options
* Individual tables and columns
* All tables and columns

For Mixpanel integrations, you can select:

1. **Individual tables and columns**

2. **All tables and columns**

Click the tabs to view instructions for each selection method.

1. In the integration’s **Tables to Replicate tab**, locate a table you want to replicate.

2. To track a table, click the **checkbox** next to the table’s name. A blue checkmark means the table is set to replicate.

3. To track a column, click the **checkbox** next to the column’s name. A blue checkmark means the column is set to replicate.

4. Repeat this process for all the tables and columns you want to replicate.

5. When finished, click the **Finalize Your Selections** button at the bottom of the screen to save your selections.

Information note **Important**: Using the **Select All** feature will overwrite any previous selections. However, selections aren’t final until **Finalize Your Selections** is clicked. Clicking **Cancel** will restore your previous selections. Refer to the [Select All guide](https://help.qlik.com/en-US/stitch/replication/extractions/data-selection/setting-tables-and-columns-to-replicate#set-all-data-to-replicate) for more info about this feature.

1. Click into the integration from the Stitch Dashboard page.

2. Click the **Tables to Replicate** tab.

3. In the list of tables, click the box next to the **Table Names** column.

4. In the menu that displays, click **Track all Tables and Fields**:

   ![The Track all Tables and Fields menu in the Tables to Replicate tab](https://help.qlik.com/en-US/stitch/images/replication/select-all-tables-menu.png)The Track all Tables and Fields menu in the Tables to Replicate tabThe Track all Tables and Fields menu in the Tables to Replicate tab

5. Click the **Finalize Your Selections** button at the bottom of the page to save your data selections.

### Initial and historical replication jobs

After you finish setting up Mixpanel, its **Sync Status** may show as **Pending** on either the Stitch Dashboard or in the Integration Details page.

For a new integration, a **Pending** status indicates that Stitch is in the process of scheduling the initial replication job for the integration. **This may take some time to complete.**

Information note

**Initial replication jobs with Anchor Scheduling**

If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to the [Anchor Scheduling](https://help.qlik.com/en-US/stitch/replication/replication-scheduling#job-scheduling-and-anchor-times) documentation for more information.

#### Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.

Information note **Replication will continue after the seven days are over**. If you’re no longer interested in this source, be sure to **pause** or **delete** the integration to prevent unwanted usage.

## Mixpanel replication

### Attribution windows and data extraction

Information note The info in this section only applies to tables using Key-based Incremental Replication. Tables using Full Table Replication replicate fully during each replication job and don’t use attribution windows.

When Stitch runs a replication job for Mixpanel, it will use the value of the **Attribution Window** setting to query for and extract data for tables using Key-based Incremental Replication. An attribution window is a period of time for attributing results to ads and the lookback period after those actions occur during which ad results are counted.

For example: If set to **5 days**, Stitch will replicate the past five days’ worth of data for applicable tables every time a replication job runs. While Stitch replicates data in this way to account for updates to records made during the attribution window, it can have a [substantial impact on your overall row usage](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#attribution-window-row-count-impact).

**Note**: If the beginning of the attribution window is earlier than the selected Start Date, the replication will start from the Start Date and no data before that date will be fetched. For example, if you set the Start Date to five days ago and the attribution window to ten days, only the past five days’ worth of data will be replicated.

In the sections below are examples of how attribution windows impact how Stitch extracts data during historical and ongoing replication jobs.

* Historical and full re-replications
* Ongoing replications

For historical and full re-replications of Mixpanel data, Stitch will query for and extract data newer than or equal to the date defined in the **Start Date** field in the Integration Settings page.

**Example**

During the initial set up, the **Start Date** field is defined as `07/03/2017`, or `2017-07-03 00:00:00`.

If you were to write a SQL query using this date for the `revenue` table, it might look like this:

```
  SELECT *
    FROM mixpanel.revenue
   WHERE date >= '2017-07-03 00:00:00'   /* Start Date */
ORDER BY date
```

For ongoing replication jobs, Stitch will query for and extract data using the last saved maximum value in the table’s Replication Key column and the Attribution Window for the table.

**Note:** This applies to every replication job that takes place after the historical replication job.

**Example**

The last maximum saved Replication Key value for the `revenue` table is `2017-10-01 00:00:00`.

To account for the Attribution Window of 5 days, we’d subtract this from the last maximum saved Replication Key value:

`2017-10-01 00:00:00 - 5 days = 2017-09-26 00:00:00`

In this case, Stitch would query for and extract data that is newer than or equal to `2017-09-26 00:00:00` and older than or equal to `2017-10-01 00:00:00`.

If this were a SQL query, it might look like this:

```
  SELECT *
    FROM revenue
   WHERE date >= '2017-09-26 00:00:00'
                              /* max Replication Key value - Attribution Window */
     AND date <= '2017-10-01 00:00:00'
                              /* max Replication Key value from previous job */
ORDER BY date
```

#### Attribution windows and row count impact

Due to the Attribution Window, a high Replication Frequency may not be necessary. Because Stitch will replicate data from the past `N` days during every replication job, recent data will be re-replicated and count towards your row quota.

To reduce your row usage and replicating redundant data, consider setting the integration to replicate less frequently. For example: every 12 or 24 hours.

### Hidden fields in Mixpanel

The Stitch Mixpanel integration is not able to discover fields marked as hidden in your Mixpanel account. To ensure the fields you want replicated will be available in Stitch, double-check that they aren’t hidden in your Mixpanel account.

## Mixpanel table reference

Information note

**Mixpanel free plan**

The `engage` and `export` tables are not available if you are using the free Mixpanel plan.

Information note

**Schemas and versioning**

Schemas and naming conventions can change from version to version, so we recommend verifying your integration’s version before continuing.

The schema and info displayed below is for **version 1** of this integration.

This is the latest version of the Mixpanel integration.

Information note

**Table and column names in your destination**

Depending on your destination, table and column names may not appear as they are outlined below.

For example: Object names are lowercased in Redshift (`CusTomERs` &gt; `customers`), while case is maintained in PostgreSQL destinations (`CusTomERs` &gt; `CusTomERs`). Refer to the [Loading Guide](https://help.qlik.com/en-US/stitch/replication/loading/destination-guides) for your destination for more info.

### annotations

The `annotations` table contains info about annotations.

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | date |
| **Useful links** | [Mixpanel documentation](https://developer.mixpanel.com/docs/data-export-api#section-annotations "Opens in new tab: Mixpanel documentation")<br><br><br>[annotations schema on GitHub](https://github.com/singer-io/tap-mixpanel/blob/master/tap_mixpanel/schemas/annotations.json "Opens in new tab: annotations schema on GitHub")<br><br><br>[Mixpanel API method](https://mixpanel.com/api/2.0/annotations "Opens in new tab: Mixpanel API method") |

annotations table foreign keys

| Join annotations with | on |
| --- | --- |
| [cohorts](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#cohorts) | ```<br>annotations.project_id = cohorts.project_id<br>``` |

annotations table schema

| **date**<br><br><br>DATE-TIME |
| --- |
| **description**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **project\_id**<br><br><br>INTEGER |

### cohort\_members

The `cohort_members` table contains info about the cohorts user profiles belong to.

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | cohort\_id<br><br>distinct\_id |
| **Useful links** | [Mixpanel documentation](https://developer.mixpanel.com/docs/data-export-api#section-engage "Opens in new tab: Mixpanel documentation")<br><br><br>[cohort_members schema on GitHub](https://github.com/singer-io/tap-mixpanel/blob/master/tap_mixpanel/schemas/cohort_members.json "Opens in new tab: cohort_members schema on GitHub")<br><br><br>[Mixpanel API method](https://mixpanel.com/api/2.0/cohorts/list "Opens in new tab: Mixpanel API method") |

cohort\_members table foreign keys

| Join cohort\_members with | on |
| --- | --- |
| [cohorts](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#cohorts) | ```<br>cohort_members.cohort_id = cohorts.id<br>``` |

cohort\_members table schema

| **cohort\_id**<br><br><br>INTEGER |
| --- |
| **distinct\_id**<br><br><br>STRING |

### cohorts

The `cohorts` table contains info about the cohorts in a Mixpanel project.

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | id |
| **Useful links** | [cohorts schema on GitHub](https://github.com/singer-io/tap-mixpanel/blob/master/tap_mixpanel/schemas/cohorts.json "Opens in new tab: cohorts schema on GitHub")<br><br><br>[Mixpanel API method](https://developer.mixpanel.com/docs/cohorts#section-list-cohorts "Opens in new tab: Mixpanel API method") |

cohorts table foreign keys

| Join cohorts with | on |
| --- | --- |
| [cohort_members](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#cohort-members) | ```<br>cohorts.id = cohort_members.cohort_id<br>``` |
| [annotations](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#annotations) | ```<br>cohorts.project_id = annotations.project_id<br>``` |

cohorts table schema

| **count**<br><br><br>INTEGER |
| --- |
| **created**<br><br><br>DATE-TIME |
| **description**<br><br><br>STRING |
| **id**<br><br><br>INTEGER |
| **is\_visible**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **project\_id**<br><br><br>INTEGER |

### engage

The `engage` table contains info about user profiles.

The schema for this table is dynamic, meaning that the columns Stitch detects are dependent upon the properties provided upon upload in Mixpanel. For every property available in Mixpanel for `engage` records, Stitch will display a column in the integration’s **Tables to Replicate** tab.

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Full Table |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | distinct\_id |
| **Useful links** | [engage schema on GitHub](https://github.com/singer-io/tap-mixpanel/blob/master/tap_mixpanel/schemas/engage.json "Opens in new tab: engage schema on GitHub")<br><br><br>[Mixpanel API method](https://developer.mixpanel.com/docs/data-export-api#section-engage "Opens in new tab: Mixpanel API method") |

engage table schema

| **distinct\_id**<br><br><br>STRING |
| --- |

### export

The `export` table contains “raw data dumps” of tracked events. The API endpoint for EU region servers will return a `200 terminated early` error code.

#### Table schema

The schema for this table is dynamic, meaning that the columns Stitch detects are dependent upon the properties provided upon upload in Mixpanel. For every property available in Mixpanel for `export` records, Stitch will display a column in the integration’s **Tables to Replicate** tab.

#### Replication with attribution window

This table is replicated using the **Attribution Window** value defined in the integration’s settings page. Refer to the [Replication section](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#attribution-windows-extraction) for more info.

#### Distinct events and loading behavior

As Stitch doesn’t use a Primary Key for this table, data will be loaded using [Append-Only loading](https://help.qlik.com/en-US/stitch/replication/loading/understanding-loading-behavior). This means you may see duplicate records in your destination, which requires a querying strategy that selects the latest version of each record.

Stitch takes this approach because it’s possible to track events without a `distinct_id`. In Mixpanel, `distinct_id` [is used to identify a unique user](https://help.mixpanel.com/hc/en-us/articles/115004509406-Distinct-IDs-):

> Mixpanel’s client-side tracking libraries automatically assign a distinct\_id to a user when they first visit a website or an application that has Mixpanel installed. Distinct\_id should not contain any special characters such as forward slashes, as it will break the URL. Distinct\_ids can and often should be sent in server-side implementations as well.

In order for Stitch to replicate records’ `distinct_id` attributes, your server-side Mixpanel implementation must send them with tracked events. If the server-side implementation doesn’t do this, this attribute will be `null`.

Previous versions of Stitch’s Mixpanel integration used `distinct_id` as part of a composite Primary Key for this table. However, due to the possibility of this attribute being `null`, Stitch no longer uses a Primary Key for this table, as `null` values in Primary Key columns will prevent successful Extraction.

When working with `exports` data in your destination, you’ll need to use a querying strategy that accounts for the Append-Only loading used by this table. We recommend using the following columns to de-duplicate records, along with the approach outlined in the [Querying Append-Only tables guide](https://help.qlik.com/en-US/stitch/replication/loading/querying-append-only-tables):

* `distinct_id`
* `event`
* `time`

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Loading Behavior [](https://help.qlik.com/en-US/stitch/replication/loading/understanding-loading-behavior)[the Info icon](https://help.qlik.com/en-US/stitch/replication/loading/understanding-loading-behavior)[](https://help.qlik.com/en-US/stitch/replication/loading/understanding-loading-behavior)** | Append-Only |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | time |
| **Useful links** | [export schema on GitHub](https://github.com/singer-io/tap-mixpanel/blob/master/tap_mixpanel/schemas/export.json "Opens in new tab: export schema on GitHub")<br><br><br>[Mixpanel API method](https://developer.mixpanel.com/docs/exporting-raw-data#section-export-api-reference "Opens in new tab: Mixpanel API method") |

export table schema

| **dataset**<br><br><br>STRING |
| --- |
| **distinct\_id**<br><br><br>STRING |
| **event**<br><br><br>STRING |
| **labels**<br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;. |
| **sampling\_factor**<br><br><br>INTEGER |
| **time**<br><br><br>DATE-TIME |

### funnels

The `funnels` table contains data about your Mixpanel funnels, segmented by funnel and day.

**Note**: This table is replicated using the **Attribution Window** value defined in the integration’s settings page. Refer to the [Replication section](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#attribution-windows-extraction) for more info.

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Keys ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | funnel\_id<br><br>date |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | date |
| **Useful links** | [funnels schema on GitHub](https://github.com/singer-io/tap-mixpanel/blob/master/tap_mixpanel/schemas/funnels.json "Opens in new tab: funnels schema on GitHub")<br><br><br>[Mixpanel API method](https://developer.mixpanel.com/docs/data-export-api#section-funnels "Opens in new tab: Mixpanel API method") |

funnels table schema

| **analysis**<br><br><br>OBJECT<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand analysis<br><br><table> <tr> <td> <p> <strong>								completion							</strong> </p> <p>							INTEGER													</p> </td> </tr> <tr> <td> <p> <strong>								starting_amount							</strong> </p> <p>							INTEGER													</p> </td> </tr> <tr> <td> <p> <strong>								steps							</strong> </p> <p>							INTEGER													</p> </td> </tr> <tr> <td> <p> <strong>								worst							</strong> </p> <p>							INTEGER													</p> </td> </tr> </table> |
| --- |
| **date**<br><br><br>DATE |
| **datetime**<br><br><br>DATE-TIME |
| **funnel\_id**<br><br><br>INTEGER |
| **name**<br><br><br>STRING |
| **steps**<br><br>ARRAY<br><br>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.<br><br>Click to expand steps<br><br><table> <tr> <td> <p> <strong>								avg_time							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								count							</strong> </p> <p>							INTEGER													</p> </td> </tr> <tr> <td> <p> <strong>								event							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								goal							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								overall_conv_ratio							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								step_conv_ratio							</strong> </p> <p>							NUMBER													</p> </td> </tr> <tr> <td> <p> <strong>								step_label							</strong> </p> <p>							STRING													</p> </td> </tr> <tr> <td> <p> <strong>								time_buckets_from_prev							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand time_buckets_from_prev</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								buckets							</strong> </p> <p> </p> <p>ARRAY																																</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> <tr> <td> <p> <strong>								higher							</strong> </p> <p>							INTEGER													</p> </td> </tr> <tr> <td> <p> <strong>								lower							</strong> </p> <p>							INTEGER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> <tr> <td> <p> <strong>								time_buckets_from_start							</strong> </p> <p>							OBJECT																							</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes in this object will be flattened into the table. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> <div> <button>Click to expand time_buckets_from_start</button><div> <div> <div><div><table> <tr> <td> <p> <strong>								buckets							</strong> </p> <p> </p> <p>ARRAY																																</p><div><button><div>This is a nested data structure. If your destination doesn't natively support nested data, attributes will be denested into a subtable. &lt;a href='/en-US/stitch/replication/loading/understanding-loading-row-usage-for-nested-data-structures' target='new'&gt;Learn more&lt;/a&gt;.</div></button></div> <p></p> </td> </tr> <tr> <td> <p> <strong>								higher							</strong> </p> <p>							INTEGER													</p> </td> </tr> <tr> <td> <p> <strong>								lower							</strong> </p> <p>							INTEGER													</p> </td> </tr> </table></div></div></div> </div></div> </td> </tr> </table> |

### revenue

The `revenue` table contains info about revenue, segmented by day. The API endpoint for EU region servers will return a `400 bad requests (Timeout Error)` code.

**Note**: This table is replicated using the **Attribution Window** value defined in the integration’s settings page. Refer to the [Replication section](https://help.qlik.com/en-US/stitch/integrations/saas/mixpanel#attribution-windows-extraction) for more info.

| **Replication Method [](https://help.qlik.com/en-US/stitch/replication/replication-methods)[the Info icon](https://help.qlik.com/en-US/stitch/replication/replication-methods)[](https://help.qlik.com/en-US/stitch/replication/replication-methods)** | Key-based Incremental |
| --- | --- |
| **Primary Key ![](https://help.qlik.com/en-US/stitch/images/replication/primary-key-icon.svg)** | date |
| **Replication Key ![](https://help.qlik.com/en-US/stitch/images/replication/replication-key-icon.svg)** | date |
| **Useful links** | [revenue schema on GitHub](https://github.com/singer-io/tap-mixpanel/blob/master/tap_mixpanel/schemas/revenue.json "Opens in new tab: revenue schema on GitHub")<br><br><br>[Mixpanel API method](https://developer.mixpanel.com/docs/data-export-api#hrspan-stylefont-family-courierrevenuespan "Opens in new tab: Mixpanel API method") |

revenue table schema

| **amount**<br><br><br>NUMBER |
| --- |
| **count**<br><br><br>INTEGER |
| **date**<br><br><br>DATE |
| **datetime**<br><br><br>DATE-TIME |
| **paid\_count**<br><br><br>INTEGER |