Basic methods
Tutorial steps
The event allows to evaluate the effectiveness of the tutorial steps system. The event should be sent at the end of each tutorial step indicating the number of every passed step as a parameter.
Use the following constants to specify basic events of tutorial steps:
Start or -1 - at the beginning, before the first step is completed;
Finish or -2 - instead of the final step number;
Skipped or 0 - in case user skipped the tutorial.
DevToDevTutorialState.Start or -1 - at the beginning, before the first step is completed;
DevToDevTutorialState.Finish or -2 - instead of the last step number;
DevToDevTutorialState.Skipped or 0 - if user skipped the tutorial.
DevToDev.TutorialState.Start or -1 - at the beginning, before the first step is completed;
DevToDev.TutorialState.Finish or -2 - instead of the last step number;
DevToDev.TutorialState.Skipped or 0 - if user skipped the tutorial.
-1 - Start the tutorial (at the beginning, before the first step is completed)
-2 - Tutorial finished (instead of the last step number)
0 - Tutorial skipped (if user skipped the tutorial).
DevToDev.TutorialState.Start or -1 - at the beginning, before the first step is completed;
DevToDev.TutorialState.Finish or -2 - instead of the last step number;
DevToDev.TutorialState.Skipped or 0 - if user skipped the tutorial.
Start or -1 - at the beginning, before the first step is completed;
Finish or -2 - instead of the final step number;
Skipped or 0 - in case user skipped the tutorial.
TutorialState.START or -1 - at the beginning, before the first step is completed;
TutorialState.FINISH or -2 - instead of the last step number;
TutorialState.SKIPPED or 0 - if user skipped the tutorial.
-1 (Start) - at the beginning, before the first step is completed;
-2 (Finish) - instead of the number of the last step;
0 (Skipped) - in case user skipped the tutorial.
In other cases use step numbers. Make sure you use numbers above 0 to numerate the steps.
Attention! The logic of the use of the Skipped constant in the Tutorial steps event is provided only in case a user has completely refused to pass the tutorial. After Skipped is used, no other values of the Tutorial steps event must be received.
/**
* The event allowing to track the stage of tutorial a player is on.
* @param NSUInteger tutorialStep - the latest successfully completed tutorial step.
*/
[DevToDev tutorialCompleted: (NSUInteger) tutorialStep];/**
* The event allowing to track the stage of tutorial a player is on.
* @param int tutorialStep - the latest successfully completed tutorial step.
*/
DevToDev.tutorialCompleted(int tutorialStep);/**
* <param name="state"> The latest successfully completed tutorial step </param>
*/
DevToDev.SDK.Tutorial(int state)/**
* The event allowing to track the stage of tutorial a player is on.
* @param {number} tutorialStep - the latest successfully completed tutorial step.
*/
devtodev.tutorialCompleted(tutorialStep);/// <summary> The event allowing to track the stage of tutorial a player is on. </summary>
/// <param name="tutorialStep"> The latest successfully completed tutorial step </param>
DevToDev.Analytics.Tutorial(int tutorialStep);Blueprint

Field
Type
Description
Step
int32
The latest successfully completed tutorial step
Code
Levelling up
You can analyse the distribution of the players over the levels. The event should be send right after the player reached the next level.
To track the average account balance of in-game currency by the end of each level, please provide also the list of currency names and amounts.
Blueprint

Field
Type
Description
Level
int32
level reached by the player
To track the average amount of in-game currency earned during a level, it is necessary to send a special event after each time an in-game account is replenished.
AccrualType can take one of the following values:
Payment
To track payments, add this event right after the platform confirms that a payment went through.
Unique order identifier is a value of "transactionIdentifier" property in SKPaymentTransaction object inside the receipt of completed transaction.
Attention! devtodev server does not process transactions with previously used transaction IDs. Also the server validates the identifiers in appearance, to avoid evident cheat transactions. To avoid the entering of cheat payments in reports completely, use devtodev anticheat service before creating realPayment event.
How to find the transaction ID in GooglePlay transaction?
Find the INAPP_PURCHASE_DATA object In the JSON fields that are returned in the response data for a purchase order. A unique transaction identifier is the value of orderId property in INAPP_PURCHASE_DATA object. If the order is a test purchase made via the In-app Billing Sandbox, orderId property will be empty.
Attention! devtodev server does not process transactions with previously used transaction IDs. Also, the server validates the identifiers in appearance to avoid evident cheat transactions. To avoid completely the entering of cheat payments from GooglePlay in reports, use devtodev anticheat service before creating realPayment event.
Example:
Example:
How to find the transaction ID in iTunes transaction?
Unique order identifier is a value of "transactionIdentifier" property in SKPaymentTransaction object inside the receipt of completed transaction.
How to find the transaction ID in GooglePlay transaction?
Find the INAPP_PURCHASE_DATA object In the JSON fields that are returned in the response data for a purchase order. A unique transaction identifier is the value of orderId property in INAPP_PURCHASE_DATA object. If the order is a test purchase made via the In-app Billing Sandbox, orderId property will be empty.
Attention! devtodev server does not process transactions with previously used transaction IDs. Also the server validates the identifiers in appearance, to avoid evident cheat transactions. To avoid the entering of cheat payments in reports completely, use devtodev anticheat service before creating realPayment event.
Blueprint

Field
type
Description
Transaction Id
FString
Unique transaction ID
In AppPrice
float
Product price (in user's currency)
In App Name
FString
Product name
In App Currency ISOCode
FString
Transaction currency (ISO 4217 format)
Code
In-app purchases
To track expenditures of in-game currency and the popularity of products, add this event right after the purchase.
In case a product is bought for several game currencies at once, it is necessary to make a dictionary that includes the names and amounts of the paid currencies.
In case a product was bought for several game currencies at once, it is necessary to make a hashmap that includes the names and amounts of the paid currencies.
…and so on…
Example:
In case a product was bought for several game currencies at once, it is necessary to make a hashmap including the names and amounts of the paid currencies.
Example:
In case a product was bought for several game currencies at once, it is necessary to make a dictionary including the names and amounts of the paid currencies.
In case a product was bought for several game currencies at once, it is necessary to make a dictionary including the names and amounts of the paid currencies.
In case a product was bought for several game currencies at once, it is necessary to make a hashmap including the names and amounts of the paid currencies.
Blueprint

Notice! If the purchase is done by more than one currency, then the method should be called as many times as many currencies were used, but the amount of purchase should be set only in one of the times.
Use the method “Record Simple Item Purchase with Attributes” from Analytics Blueprint Library.
Field
Type
Description
Item Id
FString
Unique purchase Id or name (max. 32 symbols)
Item Quantity
int32
Count of purchased goods
Item Id field is the identifier of purchased item, Item Quantity is the amount of purchased item. Attributes array should contain the following obligatory information:
Field
Type
Description
purchaseType
FString
Purchase type or group (max. 96 symbols)
purchasePrice
int32
Cost of purchased goods (total cost -if several goods were purchased)
purchaseCurrency
FString
Currency name (max. 24 symbols)
Code
Custom Events
If you want to count the events that are not among basic, use custom events.
The event must have a unique name and can include up to 10 parameters. The maximum length of the event name is 72 symbols. Every parameter inside one event must have a unique name. The maximum length of the parameter name is 32 symbols. The values of parameters can be String or number type (int, long, float, double). The maximum length of parameter value is 255 symbols.
Attention! No more than 300 variants of custom event names can be used for one project. Try to enlarge events in meaning by using event parameters. Events that didn't get into the limit of unique event names will be discarded.
For a string parameter it is acceptable to use not more than 50000 of unique values for the whole event use history. In case the limit of unique values is exceeded the parameter is ignored. Therefore, we recommend not to set user IDs and Unix time as parameter values of custom events. Try to integrate parameter values if they have a very large variability. Otherwise, it will be very difficult to analyse the data or after some time it may be even ignored. We strongly recommend not to change the type of data transferred in the parameter over time. In case you change the data type in parameter, in devtodev database there will appear one more parameter in the event with the same name but with different data type. The report building with such parameter will be quite difficult.
10 parameter names may be associated with any event:
Then use method:
10 parameter names may be associated with any event:
Then use method:
Example:
10 parameter names may be associated with any event:
Example:
10 parameter names may be associated with any event:
Then use method:
Example:
10 parameter names may be associated with any event:
Then use method:
10 parameter names may be associated with any event:
Then use method:
10 parameter names may be associated with any event:
Then use method:

Field
Type
Description
Event Name
FString
Custom event name
10 parameter names may be associated with any event. Use "Record Event With Attributes".

Code
Progression event
First of all, the event is used for games with short (within one game session) locations/game levels. The event allows you to gather data on passing the locations and get statistics on parameters which vary during the the location passing.
Developer must use the following two methods:
Method startProgressionEvent when enetring the location
Method endProgressionEvent when exiting (no matter if completed or not) the location
LocationEventParams class methods:
Attention! The user can be only in one location at the same time. When moving to another location (including embedded), the previous location must be completed. Information on locations, the passing of which was not completed by calling endProgressionEvent method during the game session (the call of endProgressionEvent method is not integrated; user unloaded the application from the device memory; there was an application crash), do not fall in the statistics.
Let’s look at the example of event integration on match3 game with location map:
Method startProgressionEvent when enetring the location
Method endProgressionEvent when exiting (no matter if completed or not) the location
LocationEventParams class methods:
Attention! The user can be only in one location at the same time. When moving to another location (including embedded), the previous location must be completed. Information on locations, the passing of which was not completed by calling endProgressionEvent method during the game session (the call of endProgressionEvent method is not integrated; user unloaded the application from the device memory; there was an application crash) do not fall in the statistics.
Let’s analyse the example of event integration on match3 game with location map:
Method StartProgressionEvent when enetring the location
Method EndProgressionEvent when exiting (no matter if completed or not) the location
LocationEventParams class methods:
Attention! The user can be only in one location at the same time. When moving to another location (including embedded), the previous location must be completed. Information on locations, the passing of which was not completed by calling EndProgressionEvent method during the game session (the call of EndProgressionEvent method is not integrated; user unloaded the application from the device memory; there was an application crash) do not fall in the statistics.
Let’s analyse the example of event integration on match3 game with location map:
Method startProgressionEvent when enetring the location
Method endProgressionEvent when exiting (no matter if completed or not) the location
Location parameters object contains:
Attention! The user can be only in one location at the same time. When moving to another location (including embedded), the previous location must be completed. Information on locations, the passing of which was not completed by calling endProgressionEvent method during the game session (the call of endProgressionEvent method is not integrated; user unloaded the application from the device memory; there was an application crash) do not fall in the statistics.
Let’s analyse the example of event integration on match3 game with location map:
Method StartProgressionEvent when enetring the location
Method EndProgressionEvent when exiting (no matter if completed or not) the location
LocationEventParams - the class inherited from ProgressionEventParams. Use it to describe location parameters.
LocationEventParams class methods:
Attention! The user can be only in one location at the same time. When moving to another location (including embedded), the previous location must be completed. Information on locations, the passing of which was not completed by calling EndProgressionEvent method during the game session (the call of EndProgressionEvent method is not integrated; user unloaded the application from the device memory; there was an application crash) do not fall in the statistics.
Let’s analyse the example of event integration on match3 game with location map:
Method startProgressionEvent when enetring the location
Method endProgressionEvent when exiting (no matter if completed or not) the location
LocationEventParams class methods:
Attention! The user can be only in one location at the same time. When moving to another location (including embedded), the previous location must be completed. Information on locations, the passing of which was not completed by calling endProgressionEvent method during the game session (the call of endProgressionEvent method is not integrated; user unloaded the application from the device memory; there was an application crash) do not fall in the statistics.
Let’s analyse the example of event integration on match3 game with location map:
Method StartProgressionEvent when enetring the location
Method EndProgressionEvent when exiting (no matter if completed or not) the location
LocationEventParams class methods:
Attention! The user can be only in one location at the same time. When moving to another location (including embedded), the previous location must be completed. Information on locations, the passing of which was not completed by calling EndProgressionEvent method during the game session (the call of EndProgressionEvent method is not integrated; user unloaded the application from the device memory; there was an application crash) do not fall in the statistics.
Let’s analyse the example of event integration on match3 game with location map:
Method StartProgressionEvent when enetring the location
Blueprint

Field
Type
Description
locationName
FString
The name of location user entered
Attributes
TArray<FAnalyticsEventAttr>
Location parameters
Code
Method EndProgressionEvent when exiting (no matter if completed or not) the locationBlueprint

Field
Type
Description
locationName
FString
The name of location user left
Attributes
TArray<FAnalyticsEventAttr>
Location parameters
Earned
TArray<FAnalyticsEventAttr>
User earnings within the location passing (optional). Key max. length is 24 symbols.
Spent
TArray<FAnalyticsEventAttr>
User spendings within the location passing (optional). Key max. length is 24 symbols.
Location parameters
Key
Type
Description
success
bool
State/result of the location passing (required).
source
FString
Previously visited location (optional).
difficulty
int32
Location level of difficulty (optional).
duration
int32
Time spent in the location (optional). In case the parameter is not specified by the developer, it will be automatically сalculated as the date difference between Start Progression Event and End Progression Event method calls.
Code
Attention! The user can be only in one location at the same time. When moving to another location (including embedded), the previous location must be completed. Information on locations, the passing of which was not completed by calling endProgressionEvent method during the game session (the call of endProgressionEvent method is not integrated; user unloaded the application from the device memory; there was an application crash) do not fall in the statistics.
Let’s analyse the example of event integration on match3 game with location map:
Player comes to the third location on the map “Village” while following the game map. Passing on the first level of difficulty. Before entering this location gamer passed the third location on the map “City”. .. Player passing the location. Player finishes passing of the third location on the map “Village”. The location is passed successfully. The passing took 389 seconds. Gamer finished the passing with 3 stars and gained 70 coins. While the passing gamer used boost and bought extra 5 turns.
Last updated
Was this helpful?

