Links

Basic methods

Tutorial

The event allows you to track tutorial completion and identify the stages where you lose new users.
We recommend tracking the starting point (value -1) before beginning the first tutorial stage, then passing the counting number of every completed stage after its completion (integers larger than 0), and at the end, marking the moment of the last tutorial stage completion (value -2).
If your app has an option of skipping the tutorial and the user has used it, then it’s necessary to send a refusal value (value 0) only.
iOS+macOS (Swift)
iOS+macOS (Objective-C)
Android (Kotlin)
Android (Java)
.NET Native + UWP
Unity
Web
Unreal
DTDAnalytics.tutorial(step: 1)
The method takes on the step value with an integer type.
Value
Meaning
0
The user skipped the tutorial
-1
The value defines the beginning of the tutorial
1..int
Counting number of completed tutorial stage
-2
The value defines the completion of the tutorial
[DTDAnalytics tutorialStep:1];
The method takes on the step value with an integer type.
Value
Meaning
0
The user skipped the tutorial
-1
The value defines the beginning of the tutorial
1..int
Counting number of completed tutorial stage
-2
The value defines the completion of the tutorial
DTDAnalytics.tutorial(step = 1)
The method takes on the step value with an integer type.
Value
Meaning
0
The user skipped the tutorial
-1
The value defines the beginning of the tutorial
1..int
Counting number of completed tutorial stage
-2
The value defines the completion of the tutorial
DTDAnalytics.INSTANCE.tutorial(1);
The method takes on the step value with an integer type.
Value
Meaning
0
The user skipped the tutorial
-1
The value defines the beginning of the tutorial
1..int
Counting number of completed tutorial stage
-2
The value defines the completion of the tutorial
DTDAnalytics.Tutorial(1);
The method takes on the step value with an integer type.
Value
Meaning
0
The user skipped the tutorial
-1
The value defines the beginning of the tutorial
1..int
Counting number of completed tutorial stage
-2
The value defines the completion of the tutorial
DTDAnalytics.Tutorial(1);
The method takes on the step value with an int base type.
Value
Meaning
0
The user skipped the tutorial
-1
The value defines the beginning of the tutorial
1..int
Counting number of completed tutorial stage
-2
The value defines the completion of the tutorial
window.devtodev.tutorial(1)
The method takes on the step value with an integer type.
Value
Meaning
0
The user skipped the tutorial
-1
The value defines the beginning of the tutorial
1..int
Counting number of completed tutorial stage
-2
The value defines the completion of the tutorial
Blueprint
Parameter
Type
Restrictions
Description
step
int32
From 1 to int32.MaxValue - 1
Tutorial step
UDTDAnalyticsBPLibrary::Tutorial(1);
The method takes on the step value with an int32 base type.
Value
Meaning
0
The user skipped the tutorial
-1
The value defines the beginning of the tutorial
1..int32
Counting number of completed tutorial stage
-2
The value defines the completion of the tutorial

Level up

The event allows you to analyze the distribution of players over different game levels, monitor the in-game currency balance by levels. You can find more information about the right moment to use LevelUp event here.
iOS+macOS (Swift)
iOS+macOS (Objective-C)
Android (Kotlin)
Android (Java)
.NET Native + UWP
Unity
Web
Unreal
The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.
DTDAnalytics.levelUp(level: 2)
To monitor the average account balance of in-game currency by the end of each level, dispatch in-game currencies (resources) names and their amounts to the method signature:
let balance: [String: Int] = ["Currency name 1": 100, "Currency name 2": 10]
DTDAnalytics.levelUp(level: 2, balances: balance)
Attention! The number of tracked in-game currencies or resources (their unique names) should not exceed 30 at all times.
Parameter
Type
Restrictions
Description
level
int
From 1 to Int32.max - 1
Level reached
balances
[String:Int]
String - from 1 to 24 symbols
Int - from Int64.min to int64.max
Resources’ names and number at the time of level up
The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.
[DTDAnalytics levelUp:2];
To monitor the average account balance of in-game currency by the end of each level, dispatch in-game currencies (resources) names and their amounts to the method signature:
NSDictionary *balance = @{@"Currency name 1": @100, @"Currency name 2": @10};
[DTDAnalytics levelUp:2 withBalances:balance];
Attention! The number of tracked in-game currencies or resources (their unique names) should not exceed 30 at all times.
Parameter
Type
Restrictions
Description
level
NSInteger
From 1 to Int32.max - 1
Level reached
balances
NSDictionary<NSString *,NSNumber *>
String - from 1 to 24 symbols
Int - from Int64.min to int64.max
Resources’ names and number at the time of level up
The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.
DTDAnalytics.levelUp(level = 2)
To monitor the average account balance of in-game currency by the end of each level, dispatch in-game currencies (resources) names and their amounts to the method signature:
val resources = mapOf("Currency name 1" to 100L, "Currency name 2" to 10L)
DTDAnalytics.levelUp(
level = 2,
resource = resources
)
Attention! The number of tracked in-game currencies or resources (their unique names) should not exceed 30 at all times.
Parameter
Type
Restrictions
Description
level
int
From 1 to Int.max - 1
Level reached
balances
Map<String,Long>
String - from 1 to 24 symbols
Long - from Long.min to Long.max
Resources’ names and number at the time of level up
The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.
DTDAnalytics.INSTANCE.levelUp(2);
To monitor the average account balance of in-game currency by the end of each level, dispatch in-game currencies (resources) names and their amounts to the method signature:
Map<String, Long> resources = new HashMap<>();
resources.put("Currency name 1", 100L);
resources.put("Currency name 2", 10L);
DTDAnalytics.INSTANCE.levelUp(2, resources);
Attention! The number of tracked in-game currencies or resources (their unique names) should not exceed 30 at all times.
Parameter
Type
Restrictions
Description
level
int
From 1 to Int.max - 1
Level reached
balances
Map<String,Long>
String - from 1 to 24 symbols
Long - from Long.min to Long.max
Resources’ names and number at the time of level up
The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.
DTDAnalytics.LevelUp(2);
To monitor the average account balance of in-game currency by the end of each level, dispatch in-game currencies (resources) names and their amounts to the method signature:
var balance = new Dictionary<string, long>();
balance.Add("Currency name 1", 100);
balance.Add("Currency name 2", 200);
DTDAnalytics.LevelUp(2, balance);
Attention! The number of tracked in-game currencies or resources (their unique names) should not exceed 30 at all times.
Parameter
Type
Restrictions
Description
level
int
From 1 to int.MaxValue - 1
Level reached
balances
[string: long]
String - from 1 to 24 symbols
Long - from long.MinValue to long.MaxValue
Resources’ names and number at the time of level up
The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.
DTDAnalytics.LevelUp(level: 2)
To monitor the average account balance of in-game currency by the end of each level, dispatch in-game currencies (resources) names and their amounts to the method signature:
var balance = new Dictionary<string, long>();
balance.Add("Currency name 1", 100);
balance.Add("Currency name 2", 200);
DTDAnalytics.LevelUp(level: 2, resources: balance);
Attention! The number of tracked in-game currencies or resources (their unique names) should not exceed 30 at all times.
Parameter
Type
Restrictions
Description
level
int
From 1 to int32.MaxValue - 1
Level reached
balances
[string: long]
String - from 1 to 24 symbols
Long - from long64.MinValue to long64.MaxValue
Resources’ names and number at the time of level up
The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.
devtodev.levelUp(2)
You can send and track the following data along with the level values: an average amount of the in-game currency by the end of the level, user spendings on the level, and amounts of purchased or earned in-game currency/resources. Unfortunately, Web SDK doesn’t allow to automatically calculate spending and receiving of the in-game currency/resources while users are passing the level (data accumulation on the Web might be inaccurate as users might utilize multiple browsers and devices, as well as erase local browser data).
var balance = {
"Currency name 1" : 100,
"Currency name 2" : 200
}
var spent = {
"Currency name 2" : 1
}
var earned = {
"Currency name 1" : 5
}
var bought = {
"Currency name 1" : 50,
"Currency name 2" : 30
}
window.devtodev.levelUp(2, balance, spent, earned, bought)
Attention! The number of tracked in-game currencies or resources (their unique names) should not exceed 30 at all times.
Parameter
Type
Restrictions
Description
level
int
From 1 to int.MaxValue - 1
Level reached
balances
[string: long]
String - from 1 to 24 symbols
Long - from long.MinValue to long.MaxValue
Resources’ names and number at the time of level up
spent
[string: long]
String - from 1 to 24 symbols Long - from 0 to Number.MAX_SAFE_INTEGER
Game currency amount spent during the level. Optional.
earned
[string: long]
String - from 1 to 24 symbols Long - from 0 to Number.MAX_SAFE_INTEGER
Game currency earned during the level. Optional.
bought
[string: long]
String - from 1 to 24 symbols Long - from 0 to Number.MAX_SAFE_INTEGER
Game currency amount bought during the level. Optional.
The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.
Blueprint
Parameter
Type
Restrictions
Description
level
int32
From 1 to int32.MaxValue - 1
Level reached
UDTDAnalyticsBPLibrary::LevelUp(2);
To monitor the average account balance of in-game currency by the end of each level, dispatch in-game currencies (resources) names and their amounts to the method signature:
Blueprint
Attention! The number of tracked in-game currencies or resources (their unique names) should not exceed 30 at all times.
Parameter
Type
Restrictions
Description
level
int32
From 1 to int32.MaxValue - 1
Level reached
balance
TMap<FString, int64>
FString - from 1 to 24 symbols
int64 - from int64.MinValue to int64.MaxValue
Resources’ names and number at the time of level up
TMap<FString, int64> balance;
balance.Add("CurrencyName", 123);
UDTDAnalyticsBPLibrary::LevelUpWithBalance(2, balance);

Current Balance

To track the average balance of in-game currency disregarding the level up event, pass the list of in-game currency (resource) names and their amount to the method signature:
iOS+macOS (Swift)
iOS+macOS (Objective-C)
Android (Kotlin)
Android (Java)
.NET Native + UWP
Unity
Web
Unreal
let balance: [String: Int] = ["Currency name 1": 100, "Currency name 2": 10]
DTDAnalytics.currentBalance(balance: balance)
NSDictionary *balance = @{@"Currency name 1": @100,
@"Currency name 2": @10};
[DTDAnalytics currentBalanceWithBalance:balance];
val balance = mapOf("Currency name 1" to 100L,
"Currency name 2" to 10L)
DTDAnalytics.currentBalance(
balance = balance
)
Map<String, Long> balance = new HashMap<>();
balance.put("Currency name 1", 100L);
balance.put("Currency name 2", 10L);
DTDAnalytics.INSTANCE.currentBalance(balance);
var balance = new Dictionary<string, long>();
balance.Add("Currency name 1", 100);
balance.Add("Currency name 2", 200);
DTDAnalytics.CurrentBalance(balance);
var balance = new Dictionary<string, long>();
balance.Add("Currency name 1", 100);
balance.Add("Currency name 2", 200);
DTDAnalytics.CurrentBalance(balance);
var balance = {
"Currency name 1" : 100,
"Currency name 2" : 10
}
window.devtodev.currentBalance(balance);
Blueprint
Parameter
Type
Restrictions
Description
balance
TMap<FString, int64>
FString - from 1 to 24 symbols
int64 - from int64.MinValue to int64.MaxValue
Resources’ names and number
TMap<FString, int64> balance;
balance.Add("CurrencyName", 123);
UDTDAnalyticsBPLibrary::CurrentBalance(balance);

Currency Accrual

You need to dispatch the event after every game account balance refill if you want to track the average in-game currency amount acquired or earned by the players for a certain timeframe or during a level playthrough.
iOS+macOS (Swift)
iOS+macOS (Objective-C)
Android (Kotlin)
Android (Java)
.NET Native + UWP
Unity
Web
Unreal
DTDAnalytics.currencyAccrual(currencyName: "Currency name 1",
currencyAmount: 100,
source: "Source name",
accrualType: .earned)
Parameter
Type
Restrictions
Description
currencyName
string
from 1 to 24 symbols
In-game currency/resource name
currencyAmount
int
from 1 to Int32.max
Amount of currency in circulation
source
string
from 1 to 23 symbols
The sources of currency/resources. It can be used for breaking down income by its sources. For example, a city builder game may have some: “Rent” for the profit received from rental property, or “Bank” if the player has purchased some currency.
accrualType
DTDAccrualType (enum)
The currency/resource source type. The player can either gain resources during the game (earned) or purchase them for money (bought)
acrualType can receive one of the following values:
public enum DTDAccrualType: Int {
case earned = 0
case bought = 1
}
[DTDAnalytics currencyName:@"Currency name 1"
currencyAmount:100
source:@"Source name"
accrualType:DTDAccrualTypeEarned];
Parameter
Type
Restrictions
Description
currencyName
NSString
from 1 to 24 symbols
In-game currency/resource name
currencyAmount
NSInteger
from 1 to Int32.max
Amount of currency in circulation
source
NSString
from 1 to 23 symbols
The sources of currency/resources. It can be used for breaking down income by its sources. For example, a city builder game may have some: “Rent” for the profit received from rental property, or “Bank” if the player has purchased some currency.
accrualType
DTDAccrualType (enum)
The currency/resource source type. The player can either gain resources during the game (earned) or purchase them for money (bought)
acrualType can receive one of the following values:
typedef enum DTDAccrualType: NSUInteger {
DTDAccrualTypeEarned = 0,
DTDAccrualTypeBought = 1,
} DTDAccrualType;
DTDAnalytics.currencyAccrual(
currencyName = "Currency name 1",
currencyAmount = 100,
source = "Source name",
DTDAccrualType = DTDAccrualType.Earned
)
Parameter
Type
Restrictions
Description
currencyName
string
from 1 to 24 symbols
In-game currency/resource name
currencyAmount
int
from 1 to Int.max
Amount of currency in circulation
source
string
from 1 to 23 symbols
The sources of currency/resources. It can be used for breaking down income by its sources. For example, a city builder game may have some: “Rent” for the profit received from rental property, or “Bank” if the player has purchased some currency.
accrualType
DTDAccrualType (enum)
The currency/resource source type. The player can either gain resources during the game (earned) or purchase them for money (bought)
accrualType can receive one of the following values:
enum class DTDAccrualType(val value: Long) {
Earned(0L),
Bought(1L);
}
DTDAnalytics.INSTANCE.currencyAccrual(
"Currency name 1",
100,
"Source name",
DTDAccrualType.Earned
);
Parameter
Type
Restrictions
Description
currencyName
string
from 1 to 24 symbols
In-game currency/resource name
currencyAmount
int
from 1 to Int.max
Amount of currency in circulation
source
string
from 1 to 23 symbols
The sources of currency/resources. It can be used for breaking down income by its sources. For example, a city builder game may have some: “Rent” for the profit received from rental property, or “Bank” if the player has purchased some currency.
accrualType
DTDAccrualType (enum)
The currency/resource source type. The player can either gain resources during the game (earned) or purchase them for money (bought)
accrualType can receive one of the following values:
public final enum class DTDAccrualType {
Earned;
Bought;
}a
DTDAnalytics.CurrencyAccrual(
currencyName: "Currency name 1",
currencyAmount: 100,
source: "Source name",
accrualType: DTDAccrualType.Earned);
Parameter
Type
Restrictions
Description
currencyName
string
from 1 to 24 symbols
In-game currency/resource name
currencyAmount
int
from 1 to Int.MaxValue
Amount of currency in circulation
source
string
from 1 to 23 symbols
The sources of currency/resources. It can be used for breaking down income by its sources. For example, a city builder game may have some: “Rent” for the profit received from rental property, or “Bank” if the player has purchased some currency.
accrualType
DTDAccrualType (enum)
The currency/resource source type. The player can either gain resources during the game (earned) or purchase them for money (bought)
AccrualType can receive one of the following values:
enum DTDAccrualType : long
{
Earned = 0L,
Bought = 1L
}
DTDAnalytics.CurrencyAccrual(currencyName: "Currency name 1",
currencyAmount: 100,
source: "Source name",
accrualType: DTDAccrualType.Earned)
Parameter
Type
Restrictions
Description
currencyName
string
from 1 to 24 symbols
In-game currency/resource name
currencyAmount
int
from 1 to Int32.MaxValue
Amount of currency in circulation
source
string
from 1 to 23 symbols
The sources of currency/resources. It can be used for breaking down income by its sources. For example, a city builder game may have some: “Rent” for the profit received from rental property, or “Bank” if the player has purchased some currency.
accrualType
DTDAccrualType (enum)
The currency/resource source type. The player can either gain resources during the game (earned) or purchase them for money (bought)
AccrualType can receive one of the following values:
public enum DTDAccrualType
{
Earned = 0,
Bought = 1
}
window.devtodev.CurrencyAccrual(
currencyName,
currencyAmount,
source,
accrualType)
Parameter
Type
Restrictions
Description
currencyName
string
from 1 to 24 symbols
In-game currency/resource name
currencyAmount
int
from 1 to Int.max
Amount of currency in circulation
source
string
from 1 to 23 symbols
The sources of currency/resources. It can be used for breaking down income by its sources. For example, a city builder game may have some: “Rent” for the profit received from rental property, or “Bank” if the player has purchased some currency.
accrualType
int
The currency/resource source type. The player can either gain resources during the game (0) or purchase them for money (1)
Example:
window.devtodev.currencyAccrua(
"Currency name 1",
100,
"Source name",
0)
Blueprint
Parameter
Type
Restrictions
Description
currencyName
FString
from 1 to 24 symbols