Unreal Engine
Plugin installation
Unzip the DTDAnalytics.zip archive to the Plugins folder of your project.
For a C++ project type, add the DTDAnalytics
name to the list of dependency module names to the <module_name>.Build.cs file of the module in which you plan to use the plugin.
Example:
Data types
class UDTDAnalyticsLibrary
A class that implements analytic methods.
Header file:
class UDTDUserCardLibrary
A class that implements user card methods.
The class header:
enum class EDTDTrackingStatus : uint8
SDK tracking status.
Header file:
Values:
Unknown = 0
- leave tracking unchangedEnable = 1
- tracking enabledDisable = 2
- tracking disabled
Example:
enum class EDTDLogLevel : uint8
SDK logging level.
Header file:
Values:
Unknown = 0
- leave logging level unchangedNo = 1
- logging disabledError = 2
- logging of errorsWarning = 3
- logging of warnings and errorsInfo = 4
- logging of information messages, warnings and errorsDebug = 5
- logging of debugging messages, informational messages, warnings and errors
Example:
enum class EDTDAccrualType : uint8
Types of resource accumulation.
Header file:
Values:
Earned = 0
- earned resourcesBought = 1
- purchased resources
Example:
enum class EDTDSocialNetwork : uint8
Predefined social media.
Header file:
Values:
Facebook = 0
Vkontakte = 1
Twitter = 2
Googleplus = 3
Whatsapp = 4
Viber = 5
Evernote = 6
Googlemail = 7
Linkedin = 8
Pinterest = 9
Reddit = 10
Renren = 11
Tumblr = 12
Qzone = 13
Example:
enum class EDTDGender: uint8
User gender.
Header file:
Values:
Unknown = 0
Male = 1
Female = 2
Example:
enum class EDTDReferralProperty : uint8
Referral properties.
Header file:
Values:
Source = 0
Medium = 1
Content = 2
Campaign = 3
Term = 4
Example:
struct FDTDOptionalInt32
An optional parameter of int32 type
Header file:
Member | Type | Description |
---|---|---|
| bool | Option label |
| int32 | Parameter value |
For your convenience, we implemented the conversion constructor:
Example:
struct FDTDOptionalString
An optional parameter of FString type.
Header file:
Member | Type | Description |
---|---|---|
| bool | Option label |
| FString | Parameter value |
For your convenience, we implemented the conversion constructor:
Example:
struct FDTDAnalyticsConfiguration
Configuration of the analytics plugin.
Header file:
Member | Type | Description |
---|---|---|
| EDTDLogLevel | Logging level |
| FDTDOptionalInt32 | Current level |
| FDTDOptionalString | User ID |
| FDTDOptionalString | Application version (Windows) |
| EDTDTrackingStatus | Tracking settings |
Example:
FDTDCustomEventParams
Custom parameters of a custom event.
Header file:
Member | Type | Description |
---|---|---|
| TMap<FString, FString> | String parameters |
| TMap<FString, int64> | Integer parameters |
| TMap<FString, float> | Real parameters (floating-point numbers) |
| TMap<FString, bool> | Boolean parameters |
Warning: avoid duplicating keys in parameters of different types, because in native code dictionaries are merged into a single dictionary [string: any].
Example:
struct FDTDStartProgressionEventParams
Parameters of the progression start event.
Header file:
Member | Type | Description |
---|---|---|
| FDTDOptionalInt32 | Difficulty |
| FDTDOptionalString | Source |
Example:
struct FDTDFinishProgressionEventParams
Parameters of the progression completion event.
Header file:
Member | Type | Description |
---|---|---|
| bool | Successful completion of the progression (βfalseβ by default) |
| int32 | Duration (if 0, duration is calculated automatically) |
| TMap<FString, int64> | Resources spent |
| TMap<FString, int64> | Resources earned |
Example:
Delegates
Header file:
Definitions:
SDK initialization
SDK initialization without parameters:
Member | Type | Description |
---|---|---|
| FString | You can find it in the settings of the corresponding application in devtodev (Settings β SDK β Integration β Credentials) |
SDK initialization with parameters:
Member | Type | Description |
---|---|---|
| FString | You can find it in the settings of the corresponding application in devtodev (Settings β SDK β Integration β Credentials) |
| FDTDAnalyticsConfiguration | Initialization parameters |
Last updated