> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.qonversion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Mailchimp

> Send iOS and Android subscription events to Mailchimp to trigger personalized emails

Qonversion sends mobile subscription events to Mailchimp to automate emails with special offers to users who cancel a trial or a subscription. A personalized email with a special offer to a user who just canceled his trial can significantly uplift your app's revenue. You need to provide a user email address using Qonversion's user properties to be able to use Mailchimp integration.

## 1. Configure the SDK

1. Set Qonversion SDKs following [installing the SDKs](install-sdk) guides.

2. Provide user email using [User Properties](user-properties):

<CodeGroup>
  ```swift Swift theme={null}
  Qonversion.shared().setUserProperty(.email, value: "me@qonversion.io")
  ```

  ```objectivec Objective-C theme={null}
  [[Qonversion sharedInstance] setUserProperty:QONUserPropertyKeyEmail value:@"me@qonversion.io"];
  ```

  ```java Java theme={null}
  Qonversion.getSharedInstance().setUserProperty(QUserPropertyKey.Email, "me@qonversion.io");
  ```

  ```kotlin Kotlin theme={null}
  Qonversion.shared.setUserProperty(QUserPropertyKey.Email, "me@qonversion.io")
  ```

  ```dart Flutter theme={null}
  Qonversion.getSharedInstance().setUserProperty(QUserPropertyKey.email, 'me@qonversion.io');
  ```

  ```typescript React Native theme={null}
  Qonversion.getSharedInstance().setUserProperty(UserPropertyKey.EMAIL, 'me@qonversion.io');
  ```

  ```csharp Unity theme={null}
  Qonversion.GetSharedInstance().SetUserProperty(UserPropertyKey.Email, "me@qonversion.io");
  ```

  ```typescript Cordova theme={null}
  Qonversion.getSharedInstance().setUserProperty(Qonversion.UserPropertyKey.EMAIL, 'me@qonversion.io');
  ```

  ```typescript Capacitor theme={null}
  Qonversion.getSharedInstance().setUserProperty(UserPropertyKey.EMAIL, 'me@qonversion.io');
  ```
</CodeGroup>

**→[Read more about User Properties here](user-properties)**

<Warning>
  ### Attention

  You need to provide user email using user properties to Qonversion. Qonversion will be able to send events to Mailchimp only for the users with the correct user email provided. Please check how to add user email to Qonversion [here](user-properties#defined-user-properties)

  Qonversion is sending the code of the registered event \{"name": "trial\_started"} to [https://mailchimp.com/developer/marketing/api/list-member-events/add-event/](https://mailchimp.com/developer/marketing/api/list-member-events/add-event/) endpoint. User ID of the MailChimp user (subscriber\_hash) is generated based on the user's email.
</Warning>

<Note>
  ### Auto-subscribe on first event

  If the user's email is not yet a subscriber in the configured audience, the first event call returns 404. Qonversion then creates the subscriber via Mailchimp's `POST /lists/{list_id}/members` endpoint with `status: "subscribed"` and retries the event call. As a result, you may see auto-created subscribers in your Mailchimp audience for users who provided their email through Qonversion but never explicitly opted in.
</Note>

## 2. Configure the Mailchimp Integration

1. Get your Mailchimp [API KEY](https://mailchimp.com/help/about-api-keys/) and [Audience ID](https://mailchimp.com/help/find-audience-id/)

2. Open the [**Integrations**](https://dash.qonversion.io/integrations) section in your Qonversion project, click **+ Add new**, choose **Mailchimp**, then provide the **API Key** and **Audience ID** (also known as List ID) and save.

<Check>
  ### Done

  Now Qonversion will start sending in-app purchases and subscriptions data to your Mailchimp account.
</Check>

***

[Kochava](kochava)

[Mixpanel](mixpanel)
