Manage postbacks for SKAdNetwork conversions🔗
General information🔗
Starting with the release of iOS 14.5, Apple is introducing a new IDFA (ATT) policy, now the application must explicitly ask the user for access to this identifier, the rating for users that will allow using it fluctuates around 10-20%. In this regard, for a significant share of the audience, the ability to track the attribution of individual users according to the old schemes is lost.
To replace Apple, it offered its solution - SKAdNetwork, which allows you to "link" installations on the user's device without the need to send an advertising identifier to the server. Apple, with the help of SKAdNetwork, itself carries out the attribution and allows the ad network to receive an impersonal postback after installation. The network may understand that the conversion (postback) was carried out for some kind of campaign, but it will not know which user. You can read more about the SKAdNetwork system on the official website.
The scheme of operation of this system is shown below:

To rate the user, the application can set the conversionValue to a 6-bit number (0-63) representing the conversion rate. After that, the system will start a 24-hour timer, after which a postback will be sent to the server of the advertising network about the conversion with the previously set conversionValue. The application can update the conversionValue (the new value must be greater than the previous one) until the timer mentioned above has expired (that is, it has not passed 24 hours since the conversionValue was last updated), and after the value is updated, the timer will start again.
MRGS Capabilities🔗
MRGS allows projects to:
- flexibly configure the rules for calculating and installing conversionValue, and the setting, the inclusion occurs remotely on the server, without updating the client;
- set conversionValue;
- collect statistics.
How MRGS works with SKAdNetwork:

To set up work with SKAdNetwork, go to the "Additional features" section in the application settings on the MRGS website, and find the "SCAD" section

To enable work with SKAdNetwork, turn on the "Send config" toggle switch, after that the client will receive the rules and set conversions. If you want to enable work in test mode (we will calculate conversions and send statistics to the server, but we will not put anything into the system), then also turn on the "Test" toggle switch.
To customize the attribution window (the time elapsed since the installation of the application, during which MRGS will update the conversionValue), set the time in hours in the "Cutoff time" field.
Then, you need to select and configure one of the rules for calculating and setting conversionValue (described below), then click "Save", after which the changes will take effect.
Rules for calculating and setting conversionValue🔗
MRGS allows you to customize how your conversionValue is calculated in one of several ways:
- Total profit from the user - setting the profit step
- Total profit from the user - loading the calculated profit steps
- Own mapping (universal system for setting rules)
Below is a description of the graft:
1. Total profit from the user - setting the profit step🔗
This rule allows you to set a certain step in dollars, according to which 63 values of intervals will be calculated, each of which will correspond to a conversionValue.
For example, if you put a step of $ 2, the following rules will be formed:
| Revenue | conversionValue |
|---|---|
| (0;2] | 1 |
| (2;4] | 2 |
| (4;6] | 3 |
| ... | ... |
| (122;124] | 62 |
| (124;+inf] | 63 |
That is, if the user spent from 0 to 2 dollars, then conversionValue = 1 will be set, if from 2 to 4 dollars, then conversionValue = 2 will be set, and so on.
To configure this rule, select the "Enter value" item, and enter the required step (can be fractional)
Accounting interval from 0 to X1
By default, the interval from 0 to X1 corresponds to conversionValue = 1 (as in the example above - if the user spent from 0 to 2 dollars, then conversionValue = 1 will be set), the same logic is used in AppsFlyer when they work with conversionValue.
MRGS allows you to exclude the first interval from the conversionValue calculation, i.e. the integral from 0 to X1 corresponds to conversionValue = 0, this also allows you to increase the last interval for conversionValue = 63 (in the example below 126 instead of 124 in the example above):
| Revenue | conversionValue |
|---|---|
| (0;2] | 0 |
| (2;4] | 1 |
| (4;6] | 2 |
| ... | ... |
| (124;126] | 62 |
| (126;+inf] | 63 |
That is, if the user has spent from 0 to 2 dollars, then it will not be exposed, if from 2 to 4 dollars, then conversionValue = 1 will be exposed, and so on.
To configure this exception, set the checkbox "interval (0;X1] must send Conversion Value = 0".
This setting is available only from SDK MRGS iOS 4.9.0, on versions below this approach is default
2. Total profit from user - loading calculated profit steps🔗
This rule is similar to the previous one, only in this case we accept a csv file from you with the specified profit intervals. The file template can be found next to the file download button.
In the file, you need to specify 63 values of the boundaries along which the gaps will be formed:
| Revenue | conversionValue |
|---|---|
| (0;X1] | 0 |
| (X1;X2] | 1 |
| (X2;X3] | 2 |
| (X3;X4] | 3 |
| ... | ... |
| (X62;X63] | 62 |
| (X63;+inf] | 63 |
It is important to note:
- border values can be fractional numbers
- if you set the value of the border = 0, then the intervals in which it enters will be excluded from the rule. (for example, if you set X3 = 0, then the intervals
(X2; X3]and(X3; X4]with conversionValue equal to 2 and 3, respectively, will not be taken into account, and conversionValue will not be set in the system)
To configure this rule, select the "Load List" item, and load the csv file.
3. Own mapping (universal system for setting rules)🔗
This system will allow you to create almost any custom rule based on events, profit, time, quantity, etc. You need to create a csv file describing the rules and upload it to the site. The file template can be found next to the file download button.
The file is a table of the form:
| conversion_value | event_name | event_value_min | event_value | event_revenue_usd_min | event_revenue_usd | event_counter | hours_from_install | is_alternative |
|---|---|---|---|---|---|---|---|---|
| int (>0) | string | float or null | float or null | float or null | float or null | int (>=1) | float (>0) or null | bool (0 or 1) or null |
Where:
| Field name | Field description |
|---|---|
| conversion_value | conversion value that must be set in the system if the rule was triggered Required parameter |
| event_name | the name of the event required to execute the rule. MRGS processes events sent via MRGS metrics (both numeric and string. In case you are using numeric metrics, you can specify in event_name number), and also sent to third-party systems connected via MRGS - AppsFlyer, MyTracker, Firebase (in this case, event_name must be specified in the format <network lowercase(appsflyer/mytracker/firebase)>_<event name in network>. For example, if you send an event level_gained to AppsFlyer, then you must specify appsflyer_level_gained in event_name) Also, there are standard names for MRGS events: mrgs_total_session - the total time the user spent in the game. mrgs_total_revenue - the total amount of money the user spent in the game. mrgs_purchase - purchase event Required parameter |
| event_value | the value that the event must have for it to be considered complete. For example, if you send an event of reaching the level level_gained and pass the number of the achieved level to it, then setting event_value = 5 means that the rule will be triggered if the player has reached level 5. If you do not set event_value, then for level_gained the rule will work if the player has reached any level. The value value is taken from the events being dispatched: For MRGS metrics - the value field in the method for sending the metric Firebase - the value field inside the passed event parameter dictionary. Mytracker and AppsFlyer - not supported, support will be added if needed. For standard events, value is: mrgs_total_session - the number of seconds. mrgs_total_revenue - the amount of money spent in local currency. mrgs_purchase - purchase amount in local currency Optional parameter |
| event_value_min | minimum event value. It is necessary to set the range of values in which the rule will be considered executed. For example, if you send an event of reaching the level level_gained and pass the number of the achieved level into it, and you want to make the rule be considered fulfilled if the player has reached any level from 3 to 6, then you can specify event_value_min = 2, and eventValue = 6 event_value in this case will be the maximum border, and event_value_min - the minimum, not included in the interval, that is - (event_value_min; eventValue] (in the example above - ( 2; 6]) Optional parameter |
| event_revenue_usd | this field is an alternative to the event_value field and works according to the same principles, it is necessary for the standard events mrgs_total_revenue and mrgs_purchase to set the required value in dollars (for these events event_value is a value in local currency), for example, if you specified event_name = "mrgs_total_revenue" and event_revenue_usd = 5 - this means that the rule will be triggered when the total amount of purchases is $ 5 Optional parameter |
| event_revenue_usd_min | this field is an alternative to the event_value_min field and works according to the same principles, it is necessary for the standard events mrgs_total_revenue and mrgs_purchase to set the required value in dollars, for example, if you specified event_name =" mrgs_purchase ", event_revenue_usd_min = 2.5 and event_revenue_usd = 5 - this means that the rule will be triggered when a one-time purchase of $ 2.5 to $ 5 is made. Optional parameter |
| event_counter | the number of times the event must occur for the rule to be considered completed For example, if you specified event_name = "mrgs_purchase" and event_counter = 3, then any purchase must be made 3 times for the rule to be triggered ... Optional parameter (default 1) |
| hours_from_install | The number of hours during which this rule can be executed. For example, if you specified event_name = "mrgs_purchase" and hours_from_install = 4.5, this means that the rule will be triggered only if the user made a purchase within the first 4.5 hours after installation. (not linked to and does not affect the attribution window) Optional parameter |
| is_alternative | this field allows you to combine rules with logical OR. Examples and descriptions of combining rules by logical AND / OR below. Optional parameter |
All the fields described above can be combined with each other, here is an example of setting the rules:
| conversion_value | event_name | event_value_min | event_value | event_revenue_usd_min | event_revenue_usd | event_counter | hours_from_install | is_alternative |
|---|---|---|---|---|---|---|---|---|
| 1 | mrgs_total_session | 100 | 500 | 1 | 0 | |||
| 2 | event_a | 5 | 0 | |||||
| 3 | event_b | 5 | 1 | 0 | ||||
| 4 | event_c | 3.4 | 5.7 | 3 | 2.5 | 0 | ||
| 7 | mrgs_total_revenue | 20 | 25 | 1 | 10 | 0 | ||
| 16 | mrgs_purchase | 1 | 5.5 | 2 | 0 |
This example defines the following rules:
- Set conversionValue = 1 if: user spent 100 to 500 seconds in the game
- Set conversionValue = 2 if: event_a happened 5 times
- Set conversionValue = 3 if: event_b has occurred with a value of 5 at least once
- Set conversionValue = 4 if: event_c has occurred with a value from 3.4 to 5.7 three times within the first 2.5 hours after setting
- Set conversionValue = 7 if: user spent between $ 20 and $ 25 in total in the first 10 hours after installation
- Set conversionValue = 16 if: there was a purchase in the amount of 1 to 5.5 dollars 2 times
It is important to note that rules can be combined with logical AND / OR. For the rules to be logical ANDed, it is sufficient that the two lines contain the same conversionValue. For the rules to be logical ORed, the string must contain the same conversionValue and the is_alternative field must be equal to 1. Example:
| conversion_value | event_name | event_value_min | event_value | event_revenue_usd_min | event_revenue_usd | event_counter | hours_from_install | is_alternative |
|---|---|---|---|---|---|---|---|---|
| 15 | mrgs_purchase | 1 | 5.5 | 1 | 0 | |||
| 15 | event_a | 2 | 0 | |||||
| 15 | mrgs_total_revenue | 20 | 25 | 1 | 1 |
In this example, a conversionValue of 15 would be set if: (made a purchase between $ 1 and $ 5.5 AND event_a occurred twice) OR (total purchases were between $ 20 and $ 25).
With the help of this system, you can set the previous two ways of forming rules, and almost any other rule.
To configure this rule, select the "Load table" item, and load the created csv file with the description of the rules.
Created: 2021-05-12