# How to tag customers when they subscribe/unsubscribe

Data Mapper for Mailchimp allows you to automatically tag contacts in your Mailchimp audience based on their subscription status in Stripe. These tags help you segment your audience and trigger targeted marketing campaigns or customer journeys. This document explains how subscription-related tagging works, how to customize tags (for Ultimate plan users), and how to use tags in Mailchimp customer journeys.

### How Subscription Tagging Works

Data Mapper responds to specific Stripe subscription events to apply or remove tags in your Mailchimp audience. The default tagging behavior is as follows:

* **Subscription Created**:
  * **Event**: Responds to the `subscription.created` event in Stripe, which occurs when a customer starts a new subscription.
  * **Action**: Automatically applies the default tag `stripe-active_subscriber` to the contact in Mailchimp, identifying them as an active subscriber.
* **Subscription Deleted**:
  * **Event**: Responds to the `subscription.deleted` event in Stripe, which occurs when a subscription is canceled or terminated.
  * **Action**: Removes the `stripe-active_subscriber` tag (if present) and applies the default tag `stripe-former_subscriber` to the contact, marking them as a former subscriber.

These tags enable you to easily differentiate between active and former subscribers for segmentation and campaign purposes.

### Customizing Tags (Ultimate Plan Only)

If you are on the **Ultimate** plan, you can customize the default tags (`stripe-active_subscriber` and `stripe-former_subscriber`) to better suit your business needs. To modify these tags:

1. Navigate to the **Settings** page in the Data Mapper for Mailchimp app within your Stripe account.
2. Go to the **Events & Tags** section.
3. Locate the settings for the `subscription.created` and `subscription.deleted` events.
4. Update the tag names to your preferred labels (e.g., `active-customer` or `canceled-subscription`).
5. Save the changes to apply the new tags for future subscription events.

Note: Users on the Starter or Pro plans cannot modify the default tags and will use `stripe-active_subscriber` and `stripe-former_subscriber`.

### Setting Up Customer Journeys with Tags

Tags applied by Data Mapper can be used in Mailchimp’s customer journey builder to create automated workflows based on subscription status. Here’s how to set up a journey that responds to these tags:

1. **Access the Journey Builder**:
   * In your Mailchimp account, go to the **Automations** section and select **Customer Journeys**.
2. **Choose a Tag-Based Trigger**:
   * Create a new journey and select the **Tag Added** trigger.
   * Specify the tag to trigger the journey, such as `stripe-active_subscriber` for new subscribers or `stripe-former_subscriber` for canceled subscriptions.
3. **Configure the Journey**:
   * Add steps to the journey, such as:
     * **Send an Email**: Welcome new subscribers with a confirmation email or offer re-engagement incentives to former subscribers.
     * **Add/Remove Tags**: Apply additional tags for further segmentation or remove outdated tags.
     * **Delay and Follow-Up**: Set a delay (e.g., 7 days) and send a follow-up email, such as a special offer for former subscribers to resubscribe.
4. **Activate the Journey**:
   * Save and activate the journey. When Data Mapper applies the specified tag (e.g., when a subscription is created or deleted in Stripe), the journey will trigger automatically.

#### Example Use Cases

* **New Subscriber Journey**:
  * Trigger: Tag `stripe-active_subscriber` is added.
  * Action: Send a welcome email with subscription details and suggest complementary products.
* **Former Subscriber Journey**:
  * Trigger: Tag `stripe-former_subscriber` is added.
  * Action: Send a re-engagement email with a discount code to encourage resubscription.

For assistance with configuring subscription tags, setting up customer journeys, or upgrading to the Ultimate plan, contact our support team at <support@data-mapper-for-mailchimp.thisdot.co>. Please include your name and Stripe account ID for prompt assistance.
