Launching a push campaign
Before you create a push campaign, make sure that you have configured push notifications and integrated the AppMetrica Push SDK. For more information, see Push notifications.
To create a push campaign in AppMetrica, go to the Push campaigns section. Click Create Push in the upper-left corner of the page. Complete the steps below.
Step 1. Choose the audience
- Enter a name for the campaign and select the app in the drop-down list.
- Enable the option Silent Push for sending silent push notifications.
Use the standard AppMetrica segments to define the audience that you are planning to send notifications to. Under the segmentation menu, you can see the number of users who will receive notifications, divided by platform and language.
The number of users shown in push campaign settings might differ from the number of active users in the selected segment.
Why the numbers don't matchAppMetrica uses the device's push token for sending push notifications. The AppMetrica Push SDK sends the push token to the server when the app starts.
This means that the segment includes users who have the app version installed with the integrated AppMetrica Push SDK library, and who have started the app at least once. Users can also disable push notifications in the app. These users aren't included in the push campaign audience.
- Click Composer to go to the next step.
Step 2. Create a push notification
Common fields that are available to all platforms:
- Title — The title of the push message. It supports Emojis.
- Text — You can enter the text in multiple languages, if necessary. The list of languages is based on data about the language set on user devices. The notification text supports Emojis.
- Default language — The language to use for the notification text if there isn't a text available in the language set on the user's device. For example, a push notification is sent to a device set to Turkish, but the Text field doesn't contain Turkish. In this case, you can set the default language to English, and the user will get a notification in English.
- Actions — The action to perform when the notification is opened. There are several options:
- Open application (by default).
- URL — Open the specified URL in the browser.
- Deeplink — Open a deeplink to a specific screen in the app. You can use a deeplink that is already defined in the app settings, or create a new one using the New link button.
- Test on the device — Sends the configured push message to the specified test device. Select a test device from the list or create a new one and click Test.
Also note the additional fields that are specific to each platform:
- Icon resource ID — The name of the resource for your app icon in the standard /res/drawable directory. The icon is shown in the notification bar. If you leave this field empty, the standard app icon is used.
- Background of icon — color of the icon. Specified as a hex code string
#AARRGGBB
. By default, the icon background is transparent. - Image URL — You can display an image next to the notification text. Specify a link to the image that you want to display (for example, http://example.com/image/pic1.png).
- Big banner picture — Full-size (full-width) image of the notification. Expands vertically if you pull the notification from top to bottom. Specify a link to the image that you want to display (for example, http://example.com/image/pic1.png).
- Push notification sound — The sound played when the message is delivered on the user's device. Possible values:
- Default — The sound will be played in accordance with the mode set on the device.
- Sound disabled — The notification will come to the device without any sound.
- Vibration — Enables or disables the vibration when a notification is received.
- Push notification priority — The push notification priority. The platform determines the priority of messages and takes appropriate actions: interrupts the user (displays a message on the screen), or does not notify the user about the message. On different devices, priority is interpreted differently.
- Expiration time — The length of time to continue trying to deliver the notification to the user's device. If this time expires and the device is still unavailable (for example, it doesn't have internet access), the notification isn't delivered. By default, the time is unrestricted.
- Channel — Push notification channel. If the channel is not specified, the default channel is used. Available for Android 8 or higher. For more information about channels, see Android documentation.
- Badge — The number that will appear on the app icon on the desktop when a notification is received.
- Expiration time — The length of time to continue trying to deliver the notification to the user's device. If this time expires and the device is still unavailable (for example, it doesn't have internet access), the notification isn't delivered. By default, the time is unrestricted.
- Push notification sound — The sound played when the message is delivered on the user's device. Possible values:
- Default — The sound will be played in accordance with the mode set on the device.
- Sound disabled — The notification will come to the device without any sound.
- Track delivery — Enables/disables tracking delivery of push notifications. Enabled by default. If you disable tracking, the number of delivered push notifications in reports is equal to the number of opened messages.Attention. To track deliveries, you need to set up statistics collection for push notifications.
In the Additional data field, you can transmit any necessary data as a string value. You can process the data string by using the appropriate AppMetrica Push SDK methods (Android | iOS).
Restrictions
Pay attention to the following restrictions for push notifications:- Android and iOS: the content of the entire push message should not exceed 3968 bytes.
- Windows: the header size should not exceed 256 bytes, and the text size should not exceed 512 bytes.
AB testing
AppMetrica lets you perform AB testing when launching a push campaign. This type of testing can help you assess the effectiveness of different types of notifications within a single campaign, so you can decide which notification provides the best conversion. You can create up to four hypotheses.
One of the hypotheses can be a control set (a push notification isn't sent for it). The control set is used for comparing the behavior of users who didn't receive a notification with all those who did.
Statistics for the testing results are available in the report on push campaigns.
Step 3. Test your push notification
Testing is available for Android and iOS devices.
We recommend that you check how the notification looks on your test device before you launch the push campaign. To test the notification:
Choose an available test device from the drop-down list. If the list is empty, add a device.
- Click New device.
Specify the device ID: Google AID, Apple IDFA, IDFV, Huawei OAID, or AppMetrica Device ID.
- Install the app The Identifiers on the device.
- In the app, open the Raw tab. Your device's IDFA is shown in Advertising Identifier.
- Install your app on a test device.
- Go toand export settings with the
ios_ifv
parameter. When exporting, use filters (for example, filter by app_version_name). - Copy the ID in the ios_ifv field.
- On phones with EMUI, go to.
- Find the ID under the Your Ad-ID heading. Copy it.
- Install your app on a test device
- Go to.
- Find your profile. When searching, use segmentation (for example, by build number or device attributes).
- Open the profile card and copy the
appmetrica_device_id
.
How to get a Google AIDOpen the “Google settings” app on the device and go to Ads in the menu. The Google AID is shown on the screen (Your advertising identifier).
How to get an Apple IDFAHow to get an IDFVHow to get a Huawei OAIDHow to get an AppMetrica Device ID- Click Add. The device is shown in the drop-down list.
Add a new device- Click Test. The notification will be sent to the testing device.
If testing was successful, click Submit page to go to the next step.
Step 4. Check the information and send the push notification
On the page for submitting the push notification, you can see all the general information about the message that will be sent. Make sure that everything is correct.
- To delay sending the message, go to the Send schedule section.
Click Later and select the date and time in the calendar. If you want to adjust the sending time to use the time zone on the device, enable the use device time zone option.
- To launch the campaign, click Send push to users.