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

# Set up opt-outs for promotional app push notifications

> Register an opt-out page and filter promotional app push campaigns by marketing consent.

To send promotional push notifications, first use the app SDK to record whether each user has opted in. Use that record to filter recipients when you set up the campaign.

## 1. Save marketing consent as a user property

When a user changes their preference on the opt-out page or in your app's notification settings, use the app SDK to save the new consent status in Notifly.

The SDK examples below show how to save a user's opt-in.

> [tab] iOS
>
> ```swift title="iOS" theme={null}
> let userProperties = [
>     "mkt_push_agreed": true
> ] as [String: Any]
>
> Notifly.setUserProperties(userProperties: userProperties)
> ```

> [tab] Android
>
> ```kotlin title="Android" theme={null}
> Notifly.setUserProperties(
>     context,
>     mapOf("mkt_push_agreed" to true)
> )
> ```

> [tab] React Native
>
> ```js title="React Native" theme={null}
> notifly.setUserProperties({
>   mkt_push_agreed: true,
> });
> ```

> [tab] Flutter
>
> ```dart title="Flutter" theme={null}
> await NotiflyPlugin.setUserProperties({
>   'mkt_push_agreed': true,
> });
> ```

## 2. Add a default audience condition (optional)

In **Settings > Product & Project > Default Campaign User Conditions**, add a condition for the app push channel.

The screenshot uses `mkt_push_agreed` as an example. Select the key your service uses to store marketing consent.

![Default audience condition for app push](https://mintcdn.com/notifly/dcFO7QF5JScPffiH/images/i18n/en/app-push-notification/app-push-default-user-condition.png?fit=max\&auto=format\&n=dcFO7QF5JScPffiH\&q=85\&s=d70bac2656e708b29f6cc163af4bcb6f)

## 3. Register a marketing opt-out page

To use the built-in opt-out button in a single-language notification, register the **Marketing Unsubscribe Page** in **Settings > Channel Settings > Push Notification (App)**.

Enter the URL or deep link for the page that should open when a user taps the opt-out button. To open your app's notification settings, enter a deep link the app can handle.

For promotional app notifications in South Korea, check the opt-out requirements for your flow. KISA's guidance covers avoiding steps such as requiring the user to sign in to opt out. See the [KISA anti-spam guide (Korean)](https://spam.kisa.or.kr/spam/na/ntt/selectNttInfo.do?bbsId=1002\&mi=1020\&nttSn=3001).

![Marketing opt-out page settings](https://mintcdn.com/notifly/dcFO7QF5JScPffiH/images/i18n/en/app-push-notification/marketing-unsubscribe-page-register.png?fit=max\&auto=format\&n=dcFO7QF5JScPffiH\&q=85\&s=353666b99937efeea6b3212f41442a1d)

> [!WARNING]
>
> The opt-out button is available starting with these SDK versions:
>
> * iOS SDK: `2.6.0` or later
> * Android SDK: `1.21.0` or later
> * React Native SDK: `4.2.0` or later
> * Flutter SDK: `2.3.0` or later
>
> The opt-out button is hidden in app versions that use an older SDK.

### Examples by platform

![Examples of the app push opt-out button on Android and iOS](https://mintcdn.com/notifly/dcFO7QF5JScPffiH/images/i18n/en/app-push-notification/app-push-unsubscribe-preview-platforms.png?fit=max\&auto=format\&n=dcFO7QF5JScPffiH\&q=85\&s=20b82752d12d44244d4bd5b8e027beec)

## 4. Configure a promotional app push campaign

Under **Delivery Target > User Group Settings**, select **Filter by conditions**. If you saved a marketing consent filter for app push, turn on **Default User Condition**. Otherwise, add a condition that includes only users who have opted in. The default condition does not apply when you select **Send to all users** or use a CSV audience. If you use a CSV, include only recipients who have opted in.

![Default User Condition enabled in the campaign audience settings](https://mintcdn.com/notifly/dcFO7QF5JScPffiH/images/i18n/en/app-push-notification/app-push-campaign-default-user-condition.png?fit=max\&auto=format\&n=dcFO7QF5JScPffiH\&q=85\&s=0fff4372c2c870410634767bfefdb908)

For a single-language message, turn on **Is Advertising Message** in the message editor.

![Advertising message setting for app push](https://mintcdn.com/notifly/dcFO7QF5JScPffiH/images/i18n/en/app-push-notification/app-push-ad-message-option.png?fit=max\&auto=format\&n=dcFO7QF5JScPffiH\&q=85\&s=7e69be5f6ad325365fa58b0826ee537c)

If you registered a marketing opt-out page in section 3, Notifly includes the information the app needs to show the opt-out button.

For a localized message, follow the [promotional message instructions](https://docs.notifly.tech/en/user-guide/campaigns/localized-messages.md#2-4-write-promotional-messages) to add the required advertising disclosures and opt-out instructions to each language version.

> [!TIP]
>
> Before sending to your audience, run an internal test campaign. For a scheduled or event-triggered campaign, keep the consent filter on. In **Delivery Target > User Group Settings**, turn on **Test Mode**.
>
> In **Test Recipients List**, enter the external user IDs of internal testers who have opted in. Before you run the campaign, check that the list contains at least one tester and includes only those testers.
>
> * **Single-language messages:** Check that the opt-out button appears in the test notification. Tap it to check that it opens the page you registered.
> * **Localized messages:** Check that each language version shows the required advertising disclosures and that the opt-out instructions work.

## FAQ

> [accordion] Does registering an opt-out URL stop future sends to users who opt out?
>
> The URL only opens the opt-out page. Save the user's new consent status in Notifly when they opt out. Then filter the campaign to include only users who have opted in.

> [accordion] Do informational push notifications need the marketing consent filter?
>
> The marketing consent filter is required for promotional push notifications. To send an informational push notification without this filter, turn off **Default User Condition** for the campaign or use a separate condition.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.