notifications.sendMass
Sends a message with a notification to all application users whose profiles match the specified criteria
Name | Required | Type | Description |
---|---|---|---|
text | true | | A message that will be sent as a notification to the user. The maximum text length is 200 characters |
expires | true | | The date and time of expiry of this notification. Format: yyyy.MM.dd HH:mm Note: the expiry date must be less than 14 days from the current date. Time zone used: MSK(UTC+03:00) |
status | false | | One of the values:
|
gender | false | | One of the values:
|
age_range | false | | Age range (inclusive). Format: |
birthday_range | false | | Birthday range (inclusive). Format: MM.dd–MM.dd |
country | false | | Country code in user profile |
city | false | | The city code returned in the “location.city” parameter of the users.getInfo method |
first_access_range | false | | The date range of the first launch of the application by the user (inclusive). Format: yyyy.MM.dd–yyyy.MM.dd |
last_access_range | false | | The date range of the last launch of the application by the user (inclusive). Format: yyyy.MM.dd–yyyy.MM.dd |
has_email | false | | If the parameter is set, it restricts users as follows:
|
mask | false | | The mask is 32 bits in size. It is given as a decimal number. The notification will arrive if the result of the bit AND compare operation with the user mask is not 0. (user.mask & notification.mask > 0) |
maskExactMatch | false | | Use strict bit matching in the mask and user mask. (user.mask == notification.mask) |
mark | false | | The tag that will be passed to the application in the custom_args parameter on transition by notification |
qualifier | false | | Identifier for carrying out the A/B experiment (see below). Available values:
|
test_group | false | | The sequence number of the test group in the A/B experiment. Can take value 0 as the baseline group of the experiment and 1 as the experimental group |
test_groups | false | | Number of test groups in the A/B experiment. There should be exactly 2 |
custom_button_key | false | | If set, it allows replacement of the default test value on the button in the notification. For example, if “button_save” is specified, the button will say “Save” instead of “Start playing” |
Authorization
Session is prohibitedRequired permissions
- VALUABLE_ACCESS
It is permitted to specify no more than 5 special characters or emojis in the notification text
This type of notification has the following restrictions:
- notifications are only sent to users who launched the game not more than 7 days ago;
- each user can have no more than one active mass notification from the game. If there are several mass notifications, the latest one is shown to the user.
If multiple filter criteria are specified, they are combined using logical AND. For example, if gender=MALE&age_range=20-25 is sent, the notification will be shown to users who meet both conditions: male users aged 20–25. The start and end values of the range are inclusive, so the notification from the previous example will be shown to male users whose age is equal to any of the following values: 20, 21, 22, 23, 24, 25. A maximum of 30 mailings per day is permitted.
The notification text can contain the following placeholders, which will be replaced with user data before the notification is displayed. The following placeholders are supported:
Placeholder | Description |
---|---|
${user.first-name} | User name. Example: Ivan |
${user.last-name} | User’s last name. Example: Petrov |
${user.full-name} | Full user name. Example: Ivan Petrov |
${user.age} | User’s age. Example: 25 |
A/B experiments for notifications
This method allows you to conduct A/B experiments among users. For example, you can conduct an experiment to test the most effective text in a notification, or issue different bonuses to different groups of users with notifications.
When conducting experiments, we completely take care of the task of dividing users into independent and non-overlapping experimental groups. All you have to do is determine how many test groups you will have in your experiment and send out the necessary notifications to those groups.
You can perform up to 5 different experiments at the same time. The unique identifier of the experiment is the qualifier parameter. That is, if you run 2 experiments, then for the first experiment this parameter should be equal game1 (or whatever you like), and for the second experiment it should be any of the remaining parameters, but not equal to the qualifier of the first experiment (in our example, not game1).
In each experiment, there are 2 groups of users whose metrics can be compared. These are defined by the test_group parameter:
- 0 is the baseline group of the experiment;
- 1 is the experimental group of the experiment.
These user groups will not overlap. We are responsible for this – you do not need to segregate users yourself.
A/B experiment statistics
To make it easier to analyze your A/B experiments, we have prepared tools to obtain basic statistics on notifications.
Statistics available:
- to view and download reports in the game statistics section in OK - https://ok.ru/app/appstat
- to obtain them via the OK API - stat.getFromServer. Statistics table application_notification_exp.
Type
Application paramters
User session data
|