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

# Free In-App to Collect Subscriptions to Push Notifications

In-apps are notifications sent to users within the app.

It is not required that customers subscribe to or allow your notifications for you to display in-apps. Therefore, you can use them to increase the number of subscribers to mobile push notifications: encourage users to allow notifications with a free in-app, and when clicked, show them a system window with a request to allow push notifications.

<img src="https://mintcdn.com/maestraio/8PKiDbR3rMJsCzSE/images/imported/00_freein-app-281-29.png?fit=max&auto=format&n=8PKiDbR3rMJsCzSE&q=85&s=bff22715864652c2f5998630f97bdfd7" alt="00_freein-app(1)" width="690" height="1152" data-path="images/imported/00_freein-app-281-29.png" />

# Before creating an in-app

To use the flow, the following conditions are required:

* enabled [mobile push notification](https://developers.maestra.io/docs/mobile-sdk) module;
* [integration with the mobile app](https://developers.maestra.io/docs/in-app) to display in-apps
* the app with SDK 2.9.0 or higher.

There is no limit to the number of free in-apps.

## Subscribing to push notifications and allowing them

To receive mobile push notifications, the user must:

* fit the filter “Push notifications can be sent — yes”:- allow push notifications;- have an active device token;
* subscribe to the mobile push notification channel.

<img src="https://mintcdn.com/maestraio/-w5Ud9QNiG7Y4nor/images/imported/01_freein-app.png?fit=max&auto=format&n=-w5Ud9QNiG7Y4nor&q=85&s=1be7711c5b3a2fa693231a09bf122bf3" alt="01_freein-app" width="2888" height="610" data-path="images/imported/01_freein-app.png" />

In-apps can collect **push notification permissions**. However, for users to subscribe to your marketing campaign, you need to use other mechanics: scenarios, operations, and import.

# How to create an in-app to collect subscriptions

1. Go to “**Campaigns**” → “**Campaign Manager**”:

<img src="https://mintcdn.com/maestraio/59KyfifOW7tLz5QR/images/imported/02_freein-app.png?fit=max&auto=format&n=59KyfifOW7tLz5QR&q=85&s=abd7ff1152fe3dfe53fb1f723e1c1483" alt="02_freein-app" width="2934" height="1450" data-path="images/imported/02_freein-app.png" />

2. Click “**Add Campaign**” → “**In-App**”:

<img src="https://mintcdn.com/maestraio/59KyfifOW7tLz5QR/images/imported/03_freein-app.png?fit=max&auto=format&n=59KyfifOW7tLz5QR&q=85&s=ed4a0f2ad4a155e69043f1fc8185a927" alt="03_freein-app" width="2912" height="1168" data-path="images/imported/03_freein-app.png" />

3. Select the folder to save the in-app and the app to display it:

<img src="https://mintcdn.com/maestraio/nXS6QsINTx63g9ke/images/imported/04_freein-app.png?fit=max&auto=format&n=nXS6QsINTx63g9ke&q=85&s=da26d75bc5f568a71b144fdee36e7b32" alt="04_freein-app" width="2920" height="1152" data-path="images/imported/04_freein-app.png" />

4. Select a template type:

<img src="https://mintcdn.com/maestraio/5322-upQA3cGdluA/images/imported/05_freein-app.png?fit=max&auto=format&n=5322-upQA3cGdluA&q=85&s=eb466d42126435c5b78d3464dc0ed5dc" alt="05_freein-app" width="2900" height="1670" data-path="images/imported/05_freein-app.png" />

* **Modal window with a subscription prompt** - Occupies no more than 3/4 of the screen. - Completely blocks the screen and any other activity in the app until the user closes the notification. - Closes by clicking on the cross.
  <img src="https://mintcdn.com/maestraio/5322-upQA3cGdluA/images/imported/06_freein-app.gif?s=b6078fbfe6bd8fe23062e348bd65be33" alt="06_freein-app" width="966" height="543" data-path="images/imported/06_freein-app.gif" />

* **Snackbar with a subscription prompt** - Occupies no more than 1/3 of the screen. - Appears from the top or bottom. - Looks like a push notification. - Does not block the screen or any activity in the app.  - Closes with a swipe or a click on the cross.
  <img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/07_freein-app.gif?s=99e5258c24430aca80b9cd61cac0f5af" alt="07_freein-app" width="966" height="543" data-path="images/imported/07_freein-app.gif" />

5. Specify the in-app name:

<img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/08_freein-app.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=5516809f128da64bf1924fcfe63a6c90" alt="08_freein-app" width="2916" height="996" data-path="images/imported/08_freein-app.png" />

6\. Set up the in-app appearance.
Settings are different for each template.

### The “Modal Window” template

*

### Appearance:- Link to an image. There is a default image. You can replace it with your own vertical image with an approximate aspect ratio of 4:3. If your image is wider, it will be cropped evenly on the sides to 4:3.

* **Behavior after clicking on the in-app**: ​ - Default behavior. The system will automatically open a window or the app settings with the option to allow notifications (depending on whether the system has already shown the system window to the user).- Payload is JSON code to send JSON data to the app. If you specify plain text instead of code, it will be copied to the user’s clipboard when clicked.
* **Cross to close the notification**: ​  - You can set the color, size, thickness, and position of the cross.

  <img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/09_freein-app.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=24f91893421a7ceb81d3519d8810e8c1" alt="09_freein-app" width="2840" height="1654" data-path="images/imported/09_freein-app.png" />

### The “Snackbar” template

* **Appearance**: ​- Link to an image. There is a default image.You can replace it with your own horizontal image with an approximate aspect ratio of 1:3. If the image is narrower, it will be cropped evenly at the top and bottom to 1:3.- Position on the screen: top or bottom.- Indents from screen borders: transparent borders approximately 5% of the screen width on each side.
* **Behavior after clicking on the in-app**: ​ - Default behavior. The system will automatically open a window or the app settings with the option to allow notifications (depending on whether the system has already shown the system window to the user).  - Payload is JSON code to send JSON data to the app. If you specify plain text instead of code, it will be copied to the user’s clipboard when clicked.
* **Cross to close the notification**: ​  - You can set the color, size, thickness, and position of the cross.- If you do not want the cross in the snackbar, click on the icon to remove it.
  <img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/10_freein-app.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=09b67460a55f07bccf41dffa2d720442" alt="10_freein-app" width="2926" height="1528" data-path="images/imported/10_freein-app.png" />

7. You can add more mobile apps to display the in-app in the general settings:

<img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/11_freein-app.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=27dc29751a1a73804758395abc1a3add" alt="11_freein-app" width="2100" height="1048" data-path="images/imported/11_freein-app.png" />

8\. Target the audience by specifying the following parameters: ​

* [recalculated](/segments/how-to-filter-customers-into-segments) or [static](/segments/how-to-create-a-static-customer-segment) customer segment;
* operation that will trigger the in-app when invoked;
* number of logins to the application—for example, if the request to allow push notifications appears immediately after the app is installed or during the app onboarding, show the in-app starting with the second login or later to avoid overspamming a new user;
* display screen—a category or product page to display;
* geographical location of users (country, region, city), based on IP address. Available with SDK 2.3.0 or higher.
  <img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/32.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=0be5bcd213c6cb2691c91acd4882d890" alt="32" width="2916" height="1638" data-path="images/imported/32.png" />
  The system will display the in-apps without targeted audience to all users of the selected apps who have prohibited notifications.

<Warning>
  Users will not see the same in-app twice on the same device.However, if there are several suitable apps installed, users will see the in-app in all of them.
</Warning>

9. Launch the in-app:

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/12_freein-app.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=cc0d0e88ff2a0ad0f3d73ada199d1fed" alt="12_freein-app" width="2800" height="1022" data-path="images/imported/12_freein-app.png" />

# How to evaluate the in-app efficiency

### Calculate the subscription conversion rate

Giving push notification permission does not create any actions in the customer card. Therefore, check if the mechanics worked for the user by adding [tags](/customers-orders-and-products/actions/how-to-create-an-action-template) from the scenario:

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/13_freein-app.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=75e1c4fbe15ddf5579a8ecdb53fbbfc4" alt="13_freein-app" width="2918" height="1422" data-path="images/imported/13_freein-app.png" />

To do this, add the following [flow](/flows/what-are-flows-and-how-do-you-use-them):

1. Launch—by clicking on the in-app. Select the auto-generated template:

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/14_freein-app.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=13706123ed5530763c4c91a8306d8a02" alt="14_freein-app" width="2826" height="1208" data-path="images/imported/14_freein-app.png" />

2\. Set up the waiting time for the user to perform the target action:

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/15_freein-app.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=b6394a5a37bec7aa7cac2fadb7b26f68" alt="15_freein-app" width="2840" height="1162" data-path="images/imported/15_freein-app.png" />

3\. Verify that push notifications can now be sent to the user:

<img src="https://mintcdn.com/maestraio/m5TAkUWmgaRT4x96/images/imported/16_freein-app.png?fit=max&auto=format&n=m5TAkUWmgaRT4x96&q=85&s=d2086a7d38e45dd91fea87c34a6d2538" alt="16_freein-app" width="2818" height="1090" data-path="images/imported/16_freein-app.png" />

4\. If “Yes” appears next to the filter, add a tag to the user:

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/33_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=05e038c4261b09d6b9298ebf37ef92b6" alt="33_freein-app" width="2824" height="634" data-path="images/imported/33_freein-app.png" />

The flow is ready to run:

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/34_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=f2d76eb8c22e40b68c5c9e4bcf3ef7ac" alt="34_freein-app" width="2928" height="1120" data-path="images/imported/34_freein-app.png" />

To determine the conversion rate related to subscriptions from the in-app, calculate the ratio of the customers who allowed notifications to the total number of times the in-app has been displayed:

<img src="https://mintcdn.com/maestraio/m5TAkUWmgaRT4x96/images/imported/17_freein-app.png?fit=max&auto=format&n=m5TAkUWmgaRT4x96&q=85&s=65161a269d6615a05c2abd534f58ce65" alt="17_freein-app" width="2926" height="544" data-path="images/imported/17_freein-app.png" />

<img src="https://mintcdn.com/maestraio/m5TAkUWmgaRT4x96/images/imported/18_freein-app.png?fit=max&auto=format&n=m5TAkUWmgaRT4x96&q=85&s=275311bb45e3559a6e188862ab598551" alt="18_freein-app" width="2938" height="506" data-path="images/imported/18_freein-app.png" />

# A/B testing

To compare how efficient several campaigns are at attracting subscribers, do the following:

1. Create a static segment to distribute the recipients of each in-app.2. Add users to these segments with a scenario.3. Set up in-apps to test.4. Set up scenarios to track push notification permissions.5. Calculate the conversion rates for each in-app.
   Let’s take a closer look at these steps:
2. Add a [static segmentation](/segments/how-to-create-a-static-customer-segment) by customer with segments for each in-app to test:

<img src="https://mintcdn.com/maestraio/m5TAkUWmgaRT4x96/images/imported/19_freein-app.png?fit=max&auto=format&n=m5TAkUWmgaRT4x96&q=85&s=9bee7bdd35bb47ba6e1a0ee28ac58ee3" alt="19_freein-app" width="2888" height="1246" data-path="images/imported/19_freein-app.png" />

2\. Add a [flow](/flows/what-are-flows-and-how-do-you-use-them) to distribute the recipients among the test segments: 2.1. Launch—once a day for the users who are not subscribed to notifications:

<img src="https://mintcdn.com/maestraio/m5TAkUWmgaRT4x96/images/imported/20_freein-app.png?fit=max&auto=format&n=m5TAkUWmgaRT4x96&q=85&s=924647322dbcf5bc59b537da10323d48" alt="20_freein-app" width="2816" height="1312" data-path="images/imported/20_freein-app.png" />

2.2. Split the flow into two equal parts: ​

<img src="https://mintcdn.com/maestraio/m5TAkUWmgaRT4x96/images/imported/21_freein-app.png?fit=max&auto=format&n=m5TAkUWmgaRT4x96&q=85&s=f18897e7346911c0e0ab27f60a42aca0" alt="21_freein-app" width="2936" height="1104" data-path="images/imported/21_freein-app.png" />

2.3. Add customers from each branch to the appropriate segment:

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/22_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=90bed08b32c5ae402a759214d3f733c0" alt="22_freein-app" width="2824" height="1096" data-path="images/imported/22_freein-app.png" />

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/23_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=d7d65d2349463965ee89034f88070180" alt="23_freein-app" width="2922" height="684" data-path="images/imported/23_freein-app.png" />

2.4. Configure the flow to run once for each customer:

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/24_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=1c72e73814cfd515d9e4e3224317fe82" alt="24_freein-app" width="2838" height="1182" data-path="images/imported/24_freein-app.png" />

The flow is ready to run.
3\. [Add in-apps](/mobile-app-personalization/creating-an-in-app-message) to test and specify the appropriate segment in the targeting settings.
The first in-app:

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/25_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=a7b4b841e647d643919806a33cbee889" alt="25_freein-app" width="2818" height="1046" data-path="images/imported/25_freein-app.png" />

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/26_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=cb179ead7b039e815d2aa4a00547a00c" alt="26_freein-app" width="2918" height="1666" data-path="images/imported/26_freein-app.png" />

The second in-app:

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/27_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=333b6ac979a8e105aef7d2b66bb6a601" alt="27_freein-app" width="2910" height="1002" data-path="images/imported/27_freein-app.png" />

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/28_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=302706b0f45253c26e9600f0c2f7ffee" alt="28_freein-app" width="2940" height="1622" data-path="images/imported/28_freein-app.png" />

4\. Add a scenario to track push notification permissions according to the guide above.
The only difference is that the scenario is launched by clicking on each of the two in-apps:

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/29_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=2179370d8b78bbac9f1870cfb167e966" alt="29_freein-app" width="2934" height="834" data-path="images/imported/29_freein-app.png" />

The scenario and in-apps are ready to run.
5\. Compare the conversion rates of the two campaigns to determine which in-app is more attractive.
To determine the conversion rate related to subscriptions from the in-app, calculate the ratio of the customers who allowed notifications to the total number of times the in-app was displayed.Look at the possible filters for the first in-app:

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/30_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=a3466c7e3dd9029d5fbf92fa152cd9ff" alt="30_freein-app" width="2918" height="520" data-path="images/imported/30_freein-app.png" />

<img src="https://mintcdn.com/maestraio/8VE_QojSxRA8jQ0B/images/imported/31_freein-app.png?fit=max&auto=format&n=8VE_QojSxRA8jQ0B&q=85&s=01ce44845c3fdb0ff9a12e00fc55dc46" alt="31_freein-app" width="2914" height="684" data-path="images/imported/31_freein-app.png" />
