---
title: Configuring subscribes and unsubscribes
slug: campaign/docs/8FsD-configuring-subscribes-and-unsubscribes
docTags: 
createdAt: 2026-07-20T15:44:33.739Z
---

:::hint{type="info"}
**Note**

This topic is for administrators and developers with administration access rights in Magento 2.
:::

This topic describes how to configure the newsletter subscription and unsubscription feature, if you are using Magento 2 as e-commerce platform with Optimizely Campaign. It also shows how to transfer other recipient data to Optimizely Campaign, data that is not included in the standard configuration of the Magento 2 integration.

To configure subscribes and unsubscribes, do the following:

1. Configure the [opt-in mailing](docId\:goDzgpPFphjYuRZx3GsP6) (registration confirmations) in Optimizely Campaign, and then use a field function to reference the confirmation link to your shop.
2. Create two [landing pages ](docId\:goDzgpPFphjYuRZx3GsP6)in Magento 2, one to display a successful newsletter subscription confirmation, and one to display a successful unsubscribe confirmation.
3. [Store](docId\:goDzgpPFphjYuRZx3GsP6) the client ID, the authorization code for the API access, and the ID of the opt-in process the shop.
4. Optional: [Expand the recipient list structure](docId\:goDzgpPFphjYuRZx3GsP6), to transfer other recipient/customer data that is not included in the [standard configuration](docId\:goDzgpPFphjYuRZx3GsP6) of the Magento 2 integration.

## [8FsD-configuring-subscribes-and-unsubscribes.mdx](docId\:goDzgpPFphjYuRZx3GsP6)Configuring the opt-in mailing

1. Open the Optimizely Campaign[ menu](docId\:PmNPgvNucBrAG5Rw8f41f) and select **Campaigns** > **Opt-in Processes**.
2. Select the opt-in process for the connection to your shop and click **Edit…**.

   ![Image: Edit button](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Cr8lUmjdZ0wY0GlUcrtAa-20260720-145353.png "Image: Edit button")
3. On the **Email** node, click **Properties** ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/8hGSQe8wqkLz8YdK5O277-20260720-145353.png).
4. Click **Edit Content…**.

   ![Image: Email node](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Kl0Exez-AlWyR6MM5aeTK-20260720-145353.png "Image: Email node")
5. Click the name of the paragraph that contains the registration confirmation link.
6. In the **Text** area, click **Source**.

   ![Image: View source](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/SR_qZCvjVa-sR6rp9i2rd-20260720-145353.png "Image: View source")
7. Replace the existing link with the following code lines/field functions:

```html
{Double-Opt-In-Link}?id=${user.data.bmecssid}&code=${user.data.bmecsscc}
```

:::Paragraph{indent="1"}
You will find the link to be replaced in the \<a> tag between the quotation marks.
**Example**
The following link is contained in the \<a> tag in the source code:
:::

```html
<a href="http://srv2.de/subscribe.html">Complete registration</a>
```

:::Paragraph{indent="1"}
Replace the link between the quotation marks as follows:
:::

```html
<a href="{Double-Opt-In-Link}?id=${user.data.bmecssid}&code=${user.data.bmecsscc}">Complete registration</a>
```

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Svu1xX7qg-kbJtZo2n-H1-20260720-145353.png" size="100" caption="Image: Replace link" alt="Image: Replace link" isUploading="false" showCaption="true" indent="2"}

:::hint{type="info" indent="2"}
**Note**

The parameters **id** and **code** enable the Magento 2 integration to map to the data sets in your shop.
:::

8. Click **Apply** > **Close** > **Save and close**.

## [8FsD-configuring-subscribes-and-unsubscribes.mdx](docId\:goDzgpPFphjYuRZx3GsP6)Creating landing pages

1. Log in to Magento 2 with administrator rights.
2. Select **Content** > **Pages**.

   ![Image: Pages](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/1ss0WuZkhrqitGcHYJpri-20260720-145353.png "Image: Pages")

   ![Image: Pages 2](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/W8g_k_GipJBCW24Hgot8o-20260720-145353.png "Image: Pages 2")
3. Click **Add New Page**.

   ![Image: Add new page](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/nHZl0OwWjKJCGLRkMFoyy-20260720-145353.png "Image: Add new page")
4. In the **Page Title** field, enter a name for the landing page.

   ![Image: Page Title field](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/rf1emb7dRUKxhP3Vq-R1j-20260720-145353.png "Image: Page Title field")

   :::hint{type="info"}
   **Note**

   Assign unique names to the landing pages, for example Optimizely Campaign **opt-in confirmation** or Optimizely Campaign **opt-out confirmation**.
   :::
5. Click **Content**.

   ![Image: Content link](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/y_opbB3QmeBcLEVOaZLtt-20260720-145354.png "Image: Content link")
6. In the **Content Heading** box, enter the title that you want to display on the landing page.

   ![Image: Content Heading field](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/IfBSDSZMiaZORl4dUkqLi-20260720-145354.png "Image: Content Heading field")
7. In the text box, enter the text that you want to display on the landing page.

   ![Image: Landing page text box](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/20hCDlFXlTV_6TSR5bzQ6-20260720-145354.png "Image: Landing page text box")
8. Optional: If required, change other settings on the form, such as layout adjustments under **Design**.
9. Click **Save Page**.

   ![Image: Save Page](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/OnTI77kR7A2W5diep5CDO-20260720-145354.png "Image: Save Page")
10. Repeat steps 3–9 for the second landing page you want to create.

## [8FsD-configuring-subscribes-and-unsubscribes.mdx](docId\:goDzgpPFphjYuRZx3GsP6)Storing authorization code, opt-in, and client IDs

:::hint{type="info"}
**Note**

Do not confuse the recipient list for your newsletter recipients with the transaction recipient list for your transactional mails. Customer support will set up two different types of recipient lists for the sending of newsletters and the sending of transactional mails (for example order confirmations, invoices).
:::

- **Authorization code**. For the Optimizely Campaign recipient list (created for you by [customer support](docId\:ZWe1T3UPz3JW6_4mc76qV) and saved in your client). You can locate the authorization code in your Optimizely Campaign client in the [API overview](docId\:XhqDfbEVueM9jA-rOwNM6). Open the **Recipient lists** tab and select the relevant recipient list. Click **Manage authorization codes** and copy the authorization code from the list. If no authorization code is available for the selected recipient list, click **Create authorization code**.
- **opt-in ID**. To see the opt-in ID, open the Optimizely Campaign [menu](docId\:PmNPgvNucBrAG5Rw8f41f) and select **Administration** > **API overview** > **Opt-in processes**.
- **client ID**. To see the client ID, open the Optimizely Campaign [menu](docId\:PmNPgvNucBrAG5Rw8f41f) and select **Administration** > **API Overview** > **REST API**.
  1. To store the parameters, log in to Magento 2 with administrator rights.
  2. Select **Stores** > **Configuration**.

     ![Image: Select Configuration](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/VaafyfsS5FOHNyZO2JxI6-20260720-145354.png "Image: Select Configuration")
  3. Select **Episerver** > **Episerver Campaign**.

![Image: Episerver > Episerver Campaign](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/amj5nCMj6oTX_eoJ7r1RY-20260720-145353.png "Image: Episerver > Episerver Campaign")

1. In **General Settings**, enter the following data:

   - **Client ID**. Enter the client ID.
   - **Client Name**. Enter a name for the client. You can choose any name for the client. However, use the same name as in Optimizely Campaign.
   - **Authorisation Code**. Enter the authorization code.
   - **Opt-In ID**. Enter the opt-in ID.
   - **Debug Mode**. Select **Yes**.

   ![Image: General settings](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/MGarA70Kz_pzW6bE5EwjO-20260720-145354.png "Image: General settings")
2. In the **HTTP API** area, from the **Landing page for newsletter subscription confirmation** drop-down list, select the landing page that you created for the newsletter registration in Magento 2.

   ![Image: Landing page - confirm subscription](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/hcy3b2kZHjCgi6VyGe3ko-20260720-145354.png "Image: Landing page - confirm subscription")
3. In the **HTTP API** area, from the **Landing page for newsletter unsubscribe confirmation** drop-down list, select the landing page that you created for the newsletter unsubscription in Magento 2.

   ![Image: Landing page - confirm unsubscription](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/dzPB6mvOgc1FzIkI_jVp9-20260720-145354.png "Image: Landing page - confirm unsubscription")
4. Save your changes.

   :::hint{type="info"}
   **Note**

   Coded values (Client ID, Private key) must be entered anew with each saving process. Otherwise the coded value is coded anew.
   :::

### [8FsD-configuring-subscribes-and-unsubscribes.mdx](docId\:goDzgpPFphjYuRZx3GsP6)Transferred attributes in the standard configuration

The Magento 2 integration only transfers the email addresses of customers who subscribe to the newsletter with their email address, but are not logged into their customer account. The data listed in the following table is transferred for customers who are logged into the customer account.

If a customer or an administrator changes the customer data in the **shop system**, the changes are automatically transferred to the Optimizely Campaign recipient list. Changes to customer data entered in a recipient list in Optimizely Campaign are **not** synchronized with your shop system by Magento 2 integration. For this reason, change customer data in your Magento 2 system to keep the information synchronized.

- **Email**. Email address of the customer/recipient
- **Salutation**. Title
- **Firstname**. First name
- **Lastname**. Last name
- **Language**. Language of the shop set up in Magento 2 in which the customer has registered
- **Street**. Street
- **Zip**. Postal code
- **City**. City
- **State**. State
- **Country**. Country
- **bmecssid**. ID generated by Magento 2 integration and used for identification during communication with Optimizely Campaign
- **bmecsscc**. Confirmation code generated by Magento 2 integration and used for identification during communication with Optimizely Campaign
- **store\_id**. ID of the web shop in which the customer has registered
- **dob**. Date of birth
- **group\_id**. Customer group

## [8FsD-configuring-subscribes-and-unsubscribes.mdx](docId\:goDzgpPFphjYuRZx3GsP6)Expanding the recipient list structure and transferring additional recipient data

You can transfer other recipient/customer data from Magento 2 to Optimizely Campaign, in addition to the standard attributes. To set up the transfer, you need to:

- [Request](docId\:goDzgpPFphjYuRZx3GsP6) additional recipient list fields.
- [Enable](docId\:goDzgpPFphjYuRZx3GsP6) the additional recipient data in Magento 2.

:::hint{type="info"}
**Note**

The additional attribute fields in Magento 2 must be programmed in accordance with the specifications of Magento 2. Additional attribute fields that have not been programmed according to the Magento 2 specifications cannot be transferred to Optimizely Campaign.
:::

### [8FsD-configuring-subscribes-and-unsubscribes.mdx](docId\:goDzgpPFphjYuRZx3GsP6)Requesting additional recipient list fields

To request additional recipient list fields, contact [customer support](docId\:ZWe1T3UPz3JW6_4mc76qV) and let Optimizely know which additional recipient list fields you require for user-defined attributes. [Customer support](docId\:ZWe1T3UPz3JW6_4mc76qV) will expand your list of recipients with the additional recipient list fields as per your requirements.

### [8FsD-configuring-subscribes-and-unsubscribes.mdx](docId\:goDzgpPFphjYuRZx3GsP6)Enabling the transfer of additional recipient data

After customer support adds the requested recipient list fields, activate the transfer of the corresponding recipient data via HTTP API in Magento 2.

1. Log in to Magento 2 with administrator rights.
2. Select **Stores** > **Configuration**.

   ![Image: Select Configuration](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/sCUMIiCTQPnuEAlV8UnHt-20260720-145354.png "Image: Select Configuration")
3. Select **Episerver** > **Episerver Campaign**.

   ![Image: Select Episerver > Episerver Campaign](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/sKx-Dhb-StjDUwvnp0LZh-20260720-145354.png "Image: Select Episerver > Episerver Campaign")
4. In the **HTTP API** area, in the **Configure additional customer attributes to transmit** list, select the additional recipient data that you want to transfer to Optimizely Campaign in addition to the standard attributes.

   ![Image: Customer attributes](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/M2-EpmQ14muQZUux8Xnjt-20260720-145354.png "Image: Customer attributes")

   :::hint{type="info"}
   **Tip**

   Hold down **CTRL** to select multiple attributes at the same time.
   :::
5. Save your changes.
