For the complete documentation index, see llms.txt. This page is also available as Markdown.

Basic methods

Please take a look at our Expert tips before integrating the events.

Real Payment

To track payments in a real currency, dispatch this event right after the system validates that the payment went through successfully. The event is fundamental and mandatory for all the app metrics related to monetization.

DTDAnalytics.realCurrencyPayment(orderId: "Order ID", 
                                 price: 12.5, 
                                 productId: "Product ID", 
                                 currencyCode: "USD")
Parameter
Type
Restrictions
Description

orderId

string

from 1 to 65 symbols

A unique transaction ID. Use transactionIdentifier property value in SKPaymentTransaction object in a complete transaction receipt.

currencyCode

string

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from Double.min to Double.max

The item price in the transaction currency.

productId

string

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

[DTDAnalytics realCurrencyPaymentWithOrderId:@"Order ID"
                                       price:12.5
                                   productId:@"Product ID"
                                currencyCode:@"USD"];
Parameter
Type
Restrictions
Description

orderId

NSString

from 1 to 65 symbols

A unique transaction ID. Use transactionIdentifier property value in SKPaymentTransaction object in a complete transaction receipt.

currencyCode

NSString

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from Double.min to Double.max

The item price in the transaction currency.

productId

NSString

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

DTDAnalytics.realCurrencyPayment(
    orderId = "Order ID",
    price = 12.5,
    productId = "Product ID",
    currencyCode = "USD"
)
Parameter
Type
Restrictions
Description

orderId

string

from 1 to 65 symbols

A unique transaction ID.

currencyCode

string

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from Double.min to Double.max

The item price in the transaction currency.

productId

string

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

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.

Parameter
Type
Restrictions
Description

orderId

string

from 1 to 65 symbols

A unique transaction ID.

currencyCode

string

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from Double.min to Double.max

The item price in the transaction currency.

productId

string

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

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.

Parameter
Type
Restrictions
Description

orderId

string

from 1 to 65 symbols

A unique transaction ID.

currencyCode

string

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from double.MinValue to double.MaxValue

The item price in the transaction currency.

productId

string

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

Parameter
Type
Restrictions
Description

orderId

string

from 1 to 65 symbols

A unique transaction ID.

currencyCode

string

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from Double.MinValue to Double.MaxValue

The item price in the transaction currency.

productId

string

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

Parameter
Type
Restrictions
Description

orderId

string

from 1 to 65 symbols

A unique transaction ID.

currencyCode

string

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from Number.MIN_VALUE to Number.MAX_VALUE

The item price in the transaction currency.

productId

string

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

Blueprint
Parameter
Type
Restrictions
Description

orderId

FString

from 1 to 65 symbols

A unique transaction ID.

currencyCode

FString

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

float

from float.MinValue to float.MaxValue

The item price in the transaction currency.

productId

FString

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

Parameter
Type
Restrictions
Description

orderId

String

from 1 to 65 symbols

A unique transaction ID.

currencyCode

String

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

Float

from Double.min to Double.max

The item price in the transaction currency.

productId

String

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

By default (easy to change in the app’s settings) devtodev server invalidates transactions with previously-used identifiers. Besides, the server performs identifier checks by its outer appearance in order to avoid obvious fraud.

If you want to exclude fraud payments from your reports altogether, before creating ‘Real Currency Payment’ event, use devtodev anti-cheat feature.

Custom Events

If you want to track non-basic events, you can create custom events of your own. How you are going to apply them depends solely on you.

If you want to pass custom parameters, use DTDCustomEventParameters class instance.

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 72 symbols

Custom event name.

parameters

DTDCustomEventParameters

key - from 1 to 32 symbols

value - see below

Custom event parameters.

The following data types can be passed using the DTDCustomEventParameters object:

Type
Restrictions

int

from Int64.min to Int64.max

string

from 1 to 255 symbols

bool

true/false

double

from Double.min to Double.max

If you want to pass custom parameters, use DTDCustomEventParameters class instance.

Parameter
Type
Restrictions
Description

eventName

NSString

from 1 to 72 symbols

Custom event name.

parameters

DTDCustomEventParameters

key - from 1 to 32 symbols

value - see below

Custom event parameters.

The following data types can be passed using the DTDCustomEventParameters object:

Type
Restrictions

int

from Int64.min to Int64.max

string

from 1 to 255 symbols

bool

true/false

double

from Double.min to Double.max

If you want to pass custom parameters, use DTDCustomEventParameters class instance.

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 72 symbols

Custom event name.

parameters

DTDCustomEventParameters

key - from 1 to 32 symbols

value - see below

Custom event parameters.

The following data types can be passed using the DTDCustomEventParameters object:

Type
Restrictions

Long

from Long.min to Long.max

String

from 1 to 255 symbols

Boolean

true/false

Double

from Double.min to Double.max

If you want to pass custom parameters, use DTDCustomEventParameters class instance.

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 72 symbols

Custom event name.

parameters

DTDCustomEventParameters

key - from 1 to 32 symbols

value - see below

Custom event parameters.

The following data types can be passed using the DTDCustomEventParameters object:

Type
Restrictions

Long

from Long.min to Long.max

String

from 1 to 255 symbols

Boolean

true/false

Double

from Double.min to Double.max

If you want to pass custom parameters, use DTDCustomEventParameters class instance.

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 72 symbols

Custom event name.

parameters

DTDCustomEventParameters

key - from 1 to 32 symbols

value - see below

Custom event parameters.

The following data types can be passed using the DTDCustomEventParameters object:

Type
Restrictions

long

from long.MinValue to long.MaxValue

string

from 1 to 255 symbols

bool

true/false

double

from double.MinValue to double.MaxValue

If you want to pass custom parameters, use DTDCustomEventParameters class instance.

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 72 symbols

Custom event name.

parameters

DTDCustomEventParameters

key - from 1 to 32 symbols

value - see below

Custom event parameters.

The following data types can be passed using the DTDCustomEventParameters object:

Type
Restrictions

long

from Int64.MinValue to Int64.MaxValue

string

from 1 to 255 symbols

bool

true/false

double

from Double.MinValue to Double.MaxValue

If you want to pass custom parameters, use an object with parameters.

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 72 symbols

Custom event name.

parameters

object

key - from 1 to 32 symbols

value - see below

Custom event parameters.

The following data types can be passed using parameters object:

Type
Restrictions

long

from Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER

string

from 1 to 255 symbols

bool

true/false

double

from Number.MIN_VALUE to Number.MAX_VALUE

Blueprint

Parameter
Type
Restrictions
Description

eventName

FString

from 1 to 72 symbols

Custom event name.

If you want to pass custom parameters, use:

Blueprint
Parameter
Type
Restrictions
Description

eventName

FString

from 1 to 72 symbols

Custom event name.

parameters

FDTDCustomEventParams

  • StringParameters (TMap<FString, FString>)

  • IntParameters (TMap<FString, int64>)

  • FloatParameters (TMap<FString, float>)

  • BoolParameters (TMap<FString, bool>)

key - from 1 to 32 symbols

value - see below

Custom event parameters.

Warning: avoid duplicate keys in all dictionaries. Because dictionaries are combined into a generic dictionary [string: any] in native code.

The following data types can be passed using the DTDCustomEventParameters object:

Type
Restrictions

int64

from int64.MinValue to int64.MaxValue

FString

from 1 to 255 symbols

bool

true/false

float

from float.MinValue to float.MaxValue

If you want to pass custom parameters, use GDDTDCustomEventParameters class instance.

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 72 symbols

Custom event name.

parameters

GDDTDCustomEventParams

key - from 1 to 32 symbols

value - see below

Custom event parameters.

The following data types can be passed using the GDDTDCustomEventParameters object:

Type
Restrictions

int

from Int64.min to Int64.max

String

from 1 to 255 symbols

bool

true/false

Float

from Float.min to Float.max

Subscriptions

Please note that in order to track subscriptions, you need to do the following:

  1. Call the subscriptionPayment method (described below)

To track your income from subscriptions, you need to call the following method at the moment of the subscription purchase even if the user signed up for a trial subscription: func subscriptionPayment(transaction: SKPaymentTransaction, product: SKProduct).

For example:

Further user actions - renewal, unsubscription, etc. are tracked by using the data received from AppStore in the server-server format. You will need the corresponding setting for it.

Also, if you want to track changes in the status of the subscriptions purchased before devtodev SDK 2.0 integration, you need to transfer your history of previously purchased subscriptions to devtodev.

The SDK monitors the need for historical data to avoid sending out excessive queries to App Store. Use the DTDAnalytics.isRestoreTransactionHistoryRequiredmethod to check whether or not there is a need in sending out the information about the previously purchased subscriptions to devtodev. The method returns BOOL value.

An example of a purchase history query with verification of the need for it:

Use the DTDAnalytics.subscriptionHistory method to transfer the list of previously purchased subscriptions received from App Store.

To recover the purchase history, the user should be logged in with his Apple ID. Be mindful of this before starting the recovering process.

Please note that in order to track subscriptions, you need to do the following:

  1. Call the subscriptionPayment method (described below)

To track your income from subscriptions, you need to call the following method at the moment of the subscription purchase even if the user signed up for a trial subscription: func subscriptionPayment(transaction: Transaction, product: Product).

For example:

Fork with Transaction.updates:

Further user actions - renewal, unsubscription, etc. are tracked by using the data received from AppStore in the server-server format. You will need the corresponding setting for it.

Also, if you want to track changes in the status of the subscriptions purchased before devtodev SDK 2.0 integration, you need to transfer your history of previously purchased subscriptions to devtodev.

The SDK monitors the need for historical data to avoid sending out excessive queries to App Store. Use the DTDAnalytics.isRestoreTransactionHistoryRequiredmethod to check whether or not there is a need in sending out the information about the previously purchased subscriptions to devtodev. The method returns BOOL value.

An example of a purchase history query with verification of the need for it:

Use the DTDAnalytics.subscriptionHistory method to transfer the list of previously purchased subscriptions received from App Store.

To recover the purchase history, the user should be logged in with his Apple ID. Be mindful of this before starting the recovering process.

Please note that in order to track subscriptions, you need to do the following:

  1. Call the subscriptionPayment method (described below)

To track your income from subscriptions, you need to call the following method at the moment of the subscription purchase even if the user signed up for a trial subscription: (void)subscriptionPaymentWithTransaction:(SKPaymentTransaction * _Nonnull)transaction product:(SKProduct * _Nonnull)product;

For example:

Further user actions - renewal, unsubscription, etc. are tracked by using the data received from AppStore in the server-server format. You will need the corresponding setting for it.

Also, if you want to track changes in the status of the subscriptions purchased before devtodev SDK 2.0 integration, you need to transfer your history of previously purchased subscriptions to devtodev.

The SDK monitors the need for historical data to avoid sending out excessive queries to App Store. Use the (void)isRestoreTransactionHistoryRequiredWithCompletionHandler:( void (^ _Nonnull)(BOOL))completionHandler; method to check whether or not there is a need in sending out the information about the previously purchased subscriptions to devtodev. The method returns BOOL value.

An example of a purchase history query with verification of the need for it:

Use the (void)subscriptionHistoryWithTransactions:(NSArray<SKPaymentTransaction *> * _Nonnull)transactions; method to transfer the list of previously purchased subscriptions received from App Store.

To recover the purchase history, the user should be logged in with his Apple ID. Be mindful of this before starting the recovering process.

Please note that in order to track subscriptions, you need to do the following:

  1. Call the subscriptionPayment method (described below)

Before sending a request for subscription from your app, during the creation of BillingFlowParams, to the setObfuscatedAccountId function of the BillingFlowParams.newBuilder() object insert obfuscatedAccountId obtained from DTDAnalytics.getObfuscatedAccountId.

Example:

To track your subscriptions, add this event immediately after the platform confirms that the subscription was approved by the user.

Parameter

Type

Restrictions

Description

orderId

string

from 1 to 65 symbols

A unique transaction identifier.

currencyCode

string

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from Double.min to Double.max

The item price in the transaction currency.

productId

string

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

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.

Further user actions - renewal, unsubscription, etc. are tracked by using the data received from Google Play in the server-server format. You will need the corresponding setting for it.

The subscriptionHistory method is used for matching users with subscribers who purchased their subscriptions before the SDK 2.0 integration. Otherwise, it will be impossible to establish the affiliation when it gets renewed or cancelled.

To get a list of active subscriptions call billingClient.queryPurchasesAsync. After successfully receiving a response from Google Play Services, pass it to DTDAnalytics.subscriptionHistory(purchaseList: List<String>).

purchaseList: List<String> purchaseList - a string containing list of json objects is passed to the DTDAnalytics.subscriptionHistory method. For the event to run, the json object must contain the following keys:

  • orderID - a unique transaction identifier

  • productID - a unique product identifier

The SDK monitors the need for historical data to avoid sending out excessive queries. Use the DTDAnalytics.isRestoreTransactionHistoryRequired method to check whether or not there is a need in sending out the information about the previously purchased subscriptions to devtodev. The method returns a Boolean value.

Example:

Please note that in order to track subscriptions, you need to do the following:

  1. Call the subscriptionPayment method (described below)

Before sending a request for subscription from your app, during the creation of BillingFlowParams, to the setObfuscatedAccountId function of the BillingFlowParams.newBuilder() object insert obfuscatedAccountId obtained from DTDAnalytics.INSTANCE.getObfuscatedAccountId.

Example:

To track your subscriptions, add this event immediately after the platform confirms that the subscription was approved by the user.

Parameter

Type

Restrictions

Description

orderId

string

from 1 to 65 symbols

A unique transaction identifier.

currencyCode

string

precisely 3 symbols

Transaction currency (ISO 4217 standard) e.g. USD, EUR etc.

price

double

from Double.min to Double.max

The item price in the transaction currency.

productId

string

from 1 to 255 symbols

Item name. We recommend using a bundle or names in the same language.

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.

Further user actions - renewal, unsubscription, etc. are tracked by using the data received from Google Play in the server-server format. You will need the corresponding setting for it.

The subscriptionHistory method is used for matching users with subscribers who purchased their subscriptions before the SDK 2.0 integration. Otherwise, it will be impossible to establish the affiliation when it gets renewed or cancelled.

To get a list of active subscriptions call billingClient.queryPurchasesAsync. After successfully receiving a response from Google Play Services, pass it to DTDAnalytics.subscriptionHistory(purchaseList: List<String>).

purchaseList: List<String> purchaseList - a string containing list of json objects is passed to the DTDAnalytics.INSTANCE.subscriptionHistory method. For the event to run, the json object must contain the following keys:

  • orderID - a unique transaction identifier

  • productID - a unique product identifier

The SDK monitors the need for historical data to avoid sending out excessive queries. Use the DTDAnalytics.INSTANCE.isRestoreTransactionHistoryRequired method to check whether or not there is a need in sending out the information about the previously purchased subscriptions to devtodev. The method returns a Boolean value.

Example:

Integrate the Subscriptions module into your project. You can do this by manually importing the unitypackage.

Integration by importing the unitypackage

  1. Download the latest version of devtodev package from the repository: https://github.com/devtodev-analytics/Unity-sdk-3.0/releases/latest

  2. Import DTDAnalytics.unitypackage to your project

  3. Make sure Unity IAP v5 is installed via Package Manager.

  4. Import DTDSubscriptions(IAPv5).unitypackage to your project.

For the DTDSubscriptions module to function, you need the DTDAnalytics and Unity IAP modules.

Initialization Order

Make sure to follow the correct initialization order (see example below):

  1. Initialize Unity Services

  2. Initialize DTDAnalytics

  3. Create Unity IAP StoreController

  4. Subscribe to IAP events

  5. Initialize DTDSubscriptions

  6. Connect to the store

  7. Fetch products

  8. Restore history (if required)

  9. Fetch purchases

Initialization

  1. Initialize the DTDAnalytics module (see our instruction manual).

  2. Create Unity IAP StoreController, subscribe to IAP events and initialize DTDSubscriptions:

Restore purchase history

Restore the purchase history to ensure the module functions correctly.

Call the DTDSubscriptions.History() method after successful IAP initialization.

To avoid excessive restoring of subscription history, use the DTDSubscriptions.IsRestoreTransactionHistoryRequired(Action<bool> resultCallback) method. If the resultCallback returns true, call the DTDSubscriptions.History() method.

Example:

Purchase processing

Add a DTDSubscriptions.Payment(Product product) call to the OnPurchasePending method.

Example

Full Initialization Example:

Integrate the Subscriptions module into your project. You can do this by manually importing the unitypackage.

Integration by importing the unitypackage

  1. Download the latest version of devtodev package from the repository: https://github.com/devtodev-analytics/Unity-sdk-3.0/releases/latest

  2. Import DTDAnalytics.unitypackage to your project

  3. Import DTDSubscriptions(IAPv4).unitypackage to your project.

For the DTDSubscriptions module to function, you need the DTDAnalytics and Unity IAP modules.

You also need to create an AppleTangle file (only for iOS). Open the Unity editor menu and choose Window → Unity IAP → Receipt Validation Obfuscator (pic. 1).

In case you don’t use the IAP receipt validation, clear the input field under “2. Paste the key here:” and click Obfuscate Google Play Licence Key (pic. 2).

Pic. 1
Pic. 2

Initialization

Initialize the DTDAnalytics module (see our instruction manual).

Add DTDSubscriptions.Initialize(IStoreController controller) to the OnInitialized method.

Restore purchase history

Restore purchase history in order for the module to function correctly.

Google Play

If you use Google Play, after successful IAP initialization call the DTDSubscriptions.History() method.

To avoid excessive restoring of subscription history, use the DTDSubscriptions.IsRestoreTransactionHistoryRequired(Action<bool> resultCallback) method. If the resultCallback returns true, call the DTDSubscriptions.History() method.

Example:

App Store

If you use Apple App Store, first set the DTDSubscriptions.IsRestoring property to true (this will filter out unwanted transactions). After restoring IAP transactions, call the DTDSubscriptions.History() method. After that, set the DTDSubscriptions.IsRestoring property to false.

Example:

Purchase processing

Add a DTDSubscriptions.Payment(Product product) call to the ProcessPurchase method.

Example

Below you can see an example of the entire script:

Onboarding (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.

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

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

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

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

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

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

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

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

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

Level up

This event is for games only. It is worthwhile to integrate this event into a game type project, as specified in the application settings. In projects with the “app” type, game events will not be tracked and displayed in the interface, even if they are integrated. You can verify and change the project type in Settings → General settings.

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.

The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.

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:

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.

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:

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.

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:

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.

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:

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.

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:

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.

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:

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.

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).

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

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
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

The event should be dispatched right after the level-up. The number of the level reached is passed to the level parameter.

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:

Parameter
Type
Restrictions
Description

level

int

From 1 to Int32.max - 1

Level reached

balances

GDDTDInt64Resources

String - from 1 to 24 symbols

Int - from Int64.min to int64.max

Resources’ names and number at the time of level up

Current Balance

This event is for games only. It is worthwhile to integrate this event into a game-type project, as specified in the application settings. In projects with the “app” type, game events will not be tracked and displayed in the interface, even if they are integrated. You can verify and change the project type in Settings → General settings.

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:

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

Currency Accrual

This event is for games only. It is worthwhile to integrate this event into a game type project, as specified in the application settings. In projects with the “app” type, game events will not be tracked and displayed in the interface, even if they are integrated. You can verify and change the project type in Settings → General settings.

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.

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:

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:

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:

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:

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:

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:

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:

Blueprint
Parameter
Type
Restrictions
Description

currencyName

FString

from 1 to 24 symbols

In-game currency/resource name

currencyAmount

int32

from 1 to Int32.MaxValue

Amount of currency in circulation

source

FString

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

EDTDAccrualType

The currency/resource source type. The player can either gain resources during the game (earned) or purchase them for money (bought)

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

GDDTDAccrualType (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:

Virtual Currency Payment

This event is for games only. It is worthwhile to integrate this event into a game type project, as specified in the application settings. In projects with the “app” type, game events will not be tracked and displayed in the interface, even if they are integrated. You can verify and change the project type in Settings → General settings.

Pass this event after every purchase if you want to track in-game currency spends and items’ popularity. You can apply this event to both games and any apps with virtual currency.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names and amounts of the currencies/resources.

Parameter
Type
Restrictions
Description

purchaseId

string

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

string

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int

from 1 to Int32.max

The number of units of goods purchased.

purchaseCurrency

string

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

int

from 1 to Int32.max

The price of the purchased item in the specified in-game currency.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names and amounts of the currencies/resources.

Parameter
Type
Restrictions
Description

purchaseId

NSString

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

NSString

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

NSInteger

from 1 to Int32.max

The number of units of goods purchased.

purchaseCurrency

NSString

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

NSInteger

from 1 to Int32.max

The price of the purchased item in the specified in-game currency.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names and amounts of the currencies/resources.

Parameter
Type
Restrictions
Description

purchaseId

string

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

string

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int

from 1 to Int.max

The number of units of goods purchased.

purchaseCurrency

string

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

int

from 1 to Int.max

The price of the purchased item in the specified in-game currency.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names and amounts of the currencies/resources.

Parameter
Type
Restrictions
Description

purchaseId

string

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

string

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int

from 1 to Int.max

The number of units of goods purchased.

purchaseCurrency

string

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

int

from 1 to Int.max

The price of the purchased item in the specified in-game currency.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names and amounts of the currencies/resources.

Parameter
Type
Restrictions
Description

purchaseId

string

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

string

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int

from 1 to int.MaxValue

The number of units of goods purchased.

purchaseCurrency

string

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

int

from 1 to int.MaxValue

The price of the purchased item in the specified in-game currency.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names and amounts of the currencies/resources.

Parameter
Type
Restrictions
Description

purchaseId

string

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

string

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int

from 1 to Int32.MaxValue

The number of units of goods purchased.

purchaseCurrency

string

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

int

from 1 to Int32.MaxValue

The price of the purchased item in the specified in-game currency.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names and amounts of the currencies/resources.

Parameter
Type
Restrictions
Description

purchaseId

string

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

string

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int

from 1 to Number.MAX_SAFE_INTEGER

The number of units of goods purchased.

purchaseCurrency

string

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

int

from 1 to Number.MAX_SAFE_INTEGER

The price of the purchased item in the specified in-game currency.

Blueprint
Parameter
Type
Restrictions
Description

purchaseId

FString

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

FString

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int32

from 1 to Int32.MaxValue

The number of units of goods purchased.

purchaseCurrency

FString

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

int32

from 1 to Int32.MaxValue

The price of the purchased item in the specified in-game currency.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names (FString) and amounts of the currencies/resources (int32) .

Blueprint

Parameter
Type
Restrictions
Restrictions

purchaseId

FString

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

FString

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int32

from 1 to int32.MaxValue

The number of units of goods purchased.

resources

TMap<FString, int32>

FString - from 1 to 24 symbols

int32 - from 1 to int32.MaxValue

Map with resources.

In case the item is sold for more than one currency/resource, you need to build a dictionary with all the names and amounts of the currencies/resources.

Parameter
Type
Restrictions
Description

purchaseId

String

from 1 to 32 symbols

A unique purchase name or ID. Make sure that the names are always in the same language otherwise they will be listed as different items.

purchaseType

String

from 1 to 96 symbols

The name of a resource group. For example, for “Wood” it can be “Construction materials”.

purchaseAmount

int

from 1 to Int32.max

The number of units of goods purchased.

purchaseCurrency

String

from 1 to 24 symbols

The name of a currency used for the purchase.

purchasePrice

int

from 1 to Int32.max

The price of the purchased item in the specified in-game currency.

Progression event

This event is for games only. It is worthwhile to integrate this event into a game type project, as specified in the application settings. In projects with the “app” type, game events will not be tracked and displayed in the interface, even if they are integrated. You can verify and change the project type in Settings → General settings.

First of all, the progression event is used in games with short (within one game session) areas/game levels, e.g. match 3 games. You can use the event to collect data on how well or how fast users complete levels, how difficult it is for them, how many resources they gained or spent, and other parameters.

There are two methods in working with progression event:

  • startProgressionEvent

  • finishProgressionEvent

When a player spawns at a location, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

DTDStartProgressionEventParameters:

Parameter
Type
Restrictions
Description

source

string

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

int

from 0 to Int32.max

An optional difficulty value which is set using the value: setDifficulty(difficulty: Int)

Once the player completes the location successfully, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

DTDFinishProgressionEventParameters:

Parameter
Type
Restrictions
Description

successfulCompletion

bool

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

int

from 0 to Int64.max

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between startProgressionEvent and finishProgressionEvent method calls.

spent

[String: Int]

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources consumed during an area completion.

earned

[String: Int]

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources earned during an area completion.

There are two methods in working with progression event:

  • startProgressionEvent

  • finishProgressionEvent

When a player spawns at a location, the following method is called:

Parameter
Type
Restrictions
Description

eventName

NSString

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

DTDStartProgressionEventParameters:

Parameter
Type
Restrictions
Description

source

NSString

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

NSInteger

from 0 to Int32.max

An optional difficulty value which is set using the value: setDifficulty(difficulty: Int)

Once the player completes the location successfully, the following method is called:

Parameter
Type
Restrictions
Description

eventName

NSString

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

DTDFinishProgressionEventParameters:

Parameter
Type
Restrictions
Description

successfulCompletion

BOOL

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

NSInteger

from 0 to Int64.max

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between startProgressionEvent and finishProgressionEvent method calls.

spent

NSDictionary<NSString *,NSNumber *>

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources consumed during an area completion.

earned

NSDictionary<NSString *,NSNumber *>

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources earned during an area completion.

There are two methods in working with progression event:

  • startProgressionEvent

  • finishProgressionEvent

When a player spawns at a location, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

DTDStartProgressionEventParameters:

Parameter
Type
Restrictions
Description

source

string

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

int

from 0 to Int32.max

An optional difficulty value which is set using the value: setDifficulty(difficulty: Int)

Once the player completes the location successfully, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

DTDFinishProgressionEventParameters:

Parameter
Type
Restrictions
Description

successfulCompletion

bool

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

int

from 0 to Int64.max

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between startProgressionEvent and finishProgressionEvent method calls.

spent

Map<String, Long>

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources consumed during an area completion.

earned

Map<String, Long>

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources earned during an area completion.

There are two methods in working with progression event:

  • startProgressionEvent

  • finishProgressionEvent

When a player spawns at a location, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

DTDStartProgressionEventParameters:

Parameter
Type
Restrictions
Description

source

string

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

int

from 0 to Int32.max

An optional difficulty value which is set using the value: setDifficulty(difficulty: Int)

Once the player completes the location successfully, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

DTDFinishProgressionEventParameters:

Parameter
Type
Restrictions
Description

successfulCompletion

bool

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

int

from 0 to Int64.max

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between startProgressionEvent and finishProgressionEvent method calls.

spent

Map<String, Long>

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources consumed during an area completion.

earned

Map<String, Long>

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources earned during an area completion.

There are two methods in working with progression event:

  • StartProgressionEvent

  • FinishProgressionEvent

When a player spawns at a location, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

DTDStartProgressionEventParameters:

Parameter
Type
Restrictions
Description

source

string

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

int

from 0 to int.MaxValue

An optional difficulty value.

Once the player completes the location successfully, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

DTDFinishProgressionEventParameters:

Parameter
Type
Restrictions
Description

successfulCompletion

bool

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

int

from 0 to int.MaxValue

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between StartProgressionEvent and FinishProgressionEvent method calls.

spent

[String: Int]

key - from 1 to 24 symbols

value - From 1 to int.MaxValue

Resources consumed during an area completion.

earned

[String: Int]

key - from 1 to 24 symbols

value - From 1 to int.MaxValue

Resources earned during an area completion.

There are two methods in working with progression event:

  • StartProgressionEvent

  • FinishProgressionEvent

When a player spawns at a location, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

DTDStartProgressionEventParameters:

Parameter
Type
Restrictions
Description

source

string

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

int

from 0 to Int32.MaxValue

An optional difficulty value.

Once the player completes the location successfully, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

DTDFinishProgressionEventParameters:

Parameter
Type
Restrictions
Description

successfulCompletion

bool

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

int

from 0 to Int64.MaxValue

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between StartProgressionEvent and FinishProgressionEvent method calls.

spent

[String: Int]

key - from 1 to 24 symbols

value - From 1 to Int64.MaxValue

Resources consumed during an area completion.

earned

[String: Int]

key - from 1 to 24 symbols

value - From 1 to Int64.MaxValue

Resources earned during an area completion.

There are two methods in working with progression event:

  • startProgressionEvent

  • finishProgressionEvent

When a player spawns at a location, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

parameters

object

see below

Location event parameters.

startProgressionEvent event parameters:

Parameter
Type
Restrictions
Description

source

string

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

int

from 0 to Number.MAX_SAFE_INTEGER

An optional difficulty value.

Example:

Once the player completes the location (instead of successfully or not), the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

parameters

object

see below

Location event parameters.

startProgressionEvent event parameters:

Parameter
Type
Restrictions
Description

successfulCompletion

bool

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

int

from 0 to Number.MAX_SAFE_INTEGER

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between startProgressionEvent and finishProgressionEvent method calls.

spent

[String: Int]

key - from 1 to 24 symbols

value - from 1 to Number.MAX_SAFE_INTEGER

Resources consumed during an area completion.

earned

[String: Int]

key - from 1 to 24 symbols

value - from 1 to Number.MAX_SAFE_INTEGER

Resources earned during an area completion.

Example:

There are two methods in working with progression event:

  • startProgressionEvent

  • finishProgressionEvent

When a player spawns at a location, the following method is called (one of them):

Blueprint

Parameter
Type
Restrictions
Description

eventName

FString

from 1 to 72 symbols

Progression event name.

Start progression event with parameters:

Blueprint
Parameter
Type
Restrictions
Description

eventName

FString

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

params

FDTDStartProgressionEventParams

see below

Start progression event parameters.

FDTDStartProgressionEventParams:

Parameter
Type
Restrictions
Description

source

FString

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

int32

from 0 to int32.MaxValue

An optional difficulty value.

Example:

Once the player completes the location (instead of successfully or not), the following method is called (one of them):

Blueprint

Parameter
Type
Restrictions
Description

eventName

FString

from 1 to 72 symbols

Progression event name.

Finish progression event with parameters:

Blueprint
Parameter
Type
Restrictions
Description

eventName

FString

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

parameters

FDTDFinishProgressionEventParams

see below

Finish progression event parameters.

FDTDFinishProgressionEventParameters:TMap<FString, int64>

Parameter
Type
Restrictions
Description

successfulCompletion

bool

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

int32

from 0 to int32.MaxValue

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between startProgressionEvent and finishProgressionEvent method calls.

spent

TMap<FString, int64>

key - from 1 to 24 symbols

value - from 0 to int64.MaxValue

Resources consumed during an area completion.

earned

TMap<FString, int64>

key - from 1 to 24 symbols

value - from 0 to int64.MaxValue

Resources earned during an area completion.

Example:

There are two methods in working with progression event:

  • StartProgressionEvent

  • FinishProgressionEvent

When a player spawns at a location, the following method is called:

Parameter
Type
Restrictions
Description

eventName

String

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area.

GDDTDStartProgressionEventParameters:

Parameter
Type
Restrictions
Description

source

String

from 1 to 40 symbols

The name of the previous event used for connecting events together. E.g. a previous area visited by the player.

difficulty

int

from 0 to Int32.max

An optional difficulty value which is set using the value: SetDifficulty()

Once the player completes the location successfully, the following method is called:

Parameter
Type
Restrictions
Description

eventName

string

from 1 to 40 symbols

The name of the event. It is usually the number or the name of the area. It’s important to use the name that was specified at the area’s opening.

GDDTDFinishProgressionEventParameters:

Parameter
Type
Restrictions
Description

successfulCompletion

bool

true/false

The completion event result. ‘True’ if successful, ‘false’ if unsuccessful/lost.

duration

int

from 0 to Int64.max

Time in seconds taken to complete the area. If not specified, it is automatically calculated as the difference between startProgressionEvent and finishProgressionEvent method calls.

spent

GDDTDInt64Resources

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources consumed during an area completion.

earned

GDDTDInt64Resources

key - from 1 to 24 symbols

value - from 1 to Int64.max

Resources earned during an area completion.

The user can only be in one area at a time. When moving to another area (including nested ones), the previous location must be completed. Information about events that have not been completed by calling the finishProgressionEvent method during a game session (the finishProgressionEvent method call is not integrated, or the user uses the cached app, or the app has crashed) is not included in the statistics.

If you want to use this event to track actions that take more than one game session, you can prepare the required data and call both methods when the action is completed (successfully or unsuccessfully). For example, you can use this event to track the main questline.

Last updated

Was this helpful?