Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
The SDK is available as an AAR (recommended) and JAR library. The library is available in the MavenCentral and GitHub repository.
If you use Gradle for building apps specify the following dependencies in the build.gradle
file in the dependencies block.
Use the following way to initialize the library in the first Activity onCreate()
method:
You can find the App ID in the settings of the respective app in devtodev (Settings → SDK → Integration → Credentials).
config
- is a DTDAnalyticsConfiguration
object instance that is used for specifying additional properties during initialization.
DTDAnalyticsConfiguration
Example:
Add the following strings to the proguard-rules.pro
file of your app
1. Download the latest version of devtodev SDK from the repository
2. Add DTDAnalytics.xcframework
to the project (with Do Not Embed specified)
3. Add frameworks:
AppTrackingTransparency.framework
AdSupport.framework
4. Add initialization todidFinishLaunchingWithOptions
method:
An App ID can be found in the settings of the respective app in devtodev (Settings → SDK → Integration → Credentials).
config
- an object instance of DTDAnalyticsConfiguration
, which is used for specifying additional properties during the initialization.
DTDAnalyticsConfiguration
Example:
Create Bridging-Header. To do this, you need to add any swift file to the project (don’t delete it later) and choose ‘Create Bridging Header’ in the offered dialog box.
Make sure that the ‘Build Settings’ for ‘Defines Module’ value evaluates to ‘YES’.
While importing, use: #import <DTDAnalytics/DTDAnalytics-Swift.h>
For SDK to function properly, it needs to be integrated at the earliest moment of the app launch. It is recommended that you use the following method of main entry point initialization:
Find the DevToDev.Analytics.Uwp
package using the package manager search engine and click Install. The latest version of the package is recommended.
Initialize the library using the following code:
You can find the App ID in the settings of the respective app in devtodev (Settings → SDK → Integration → Credentials).
config
- is a DTDAnalyticsConfiguration
object instance that is used for specifying additional properties during initialization.
DTDAnalyticsConfiguration
Example:
Find the DevToDev.Analytics
package using the package manager search engine and click Install. The latest version of the package is recommended.
Initialize the library using the following code:
You can find the App ID in the settings of the respective app in devtodev (Settings → SDK → Integration → Credentials).
config
- is a DTDAnalyticsConfiguration
object instance that is used for specifying additional properties during initialization.
DTDAnalyticsConfiguration
Example:
The SDK can’t control app activity hence this responsibility is passed on to the developer. During the SDK initialization, the activity is triggered automatically, and later the activity status will not change automatically. For tracking app activity, the developer can use the DTDAnalytics.StartActivity
and DTDAnalytics.StopActivity
methods. It is recommended that you use the DTDAnalytics.StopActivity
method to stop the activity when the app goes into the background or being closed. If the window is re-opened from the taskbar it is recommended to renew the activity by using the DTDAnalytics.StartActivity
method.
1
Please do the following to integrate your web application with devtodev:
1. Add the application to the Space using the wizard for adding applications.
2. To integrate SDK, add the following line to the tag of your page:
3. Init the SDK.
In order for SDK for WEB to start working, it is necessary to perform initialization right after the page is loaded and you have a basic user identifier at your disposal.
You can find the App ID in the settings of the respective app in devtodev (Settings → SDK → Integration → Credentials).
config
- is an object that is used for specifying additional properties during initialization.
Config
Example:
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:
A class that implements analytic methods.
Header file:
A class that implements user card methods.
The class header:
SDK tracking status.
Header file:
Values:
Unknown = 0
- leave tracking unchanged
Enable = 1
- tracking enabled
Disable = 2
- tracking disabled
Example:
SDK logging level.
Header file:
Values:
Unknown = 0
- leave logging level unchanged
No = 1
- logging disabled
Error = 2
- logging of errors
Warning = 3
- logging of warnings and errors
Info = 4
- logging of information messages, warnings and errors
Debug = 5
- logging of debugging messages, informational messages, warnings and errors
Example:
Types of resource accumulation.
Header file:
Values:
Earned = 0
- earned resources
Bought = 1
- purchased resources
Example:
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:
User gender.
Header file:
Values:
Unknown = 0
Male = 1
Female = 2
Example:
Referral properties.
Header file:
Values:
Source = 0
Medium = 1
Content = 2
Campaign = 3
Term = 4
Example:
An optional parameter of int32 type
Header file:
For your convenience, we implemented the conversion constructor:
Example:
An optional parameter of FString type.
Header file:
For your convenience, we implemented the conversion constructor:
Example:
Configuration of the analytics plugin.
Header file:
Example:
Custom parameters of a custom event.
Header file:
Warning: avoid duplicating keys in parameters of different types, because in native code dictionaries are merged into a single dictionary [string: any].
Example:
Parameters of the progression start event.
Header file:
Example:
Parameters of the progression completion event.
Header file:
Example:
Header file:
Definitions:
This SDK version does not support WebGL. WebGL support will be added in the next releases.
If you have previously used the Unity SDK version 2+, you need to delete the following files and folders in the "Assets" folder of your project:
1.
Attention! When importing to Unity 2020, you may face the following error:
Assembly 'Assets/Plugins/DevToDev/Analytics/Windows/AnalyticsWindowsEditor.dll' will not be loaded due to errors: AnalyticsWindowsEditor references strong named Newtonsoft.Json Assembly references: 13.0.0.0 Found in project: 12.0.0.0. Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation"
The error might occur due to the conflict between our package’s NewtonsoftJson
dependency version and the one used in the VersionControl
package. There are two ways to resolve this issue:
A. If you don’t use the VersionControl
package, remove it from the package list. Choose Window->Package Manager in the Unity window:
In the window that appears, choose Packages: In Project from a drop-down list at the top. After that, select Version Control from the package list and click Remove.
B. If you use Unity’s Version Control, you need to replace the newtonsoft.Json package
. Open the directory of your main project (the one you want to integrate analytics with) MainProject\Library\PackageCache\
and move the com.unity.nuget.newtonsoft-json
folder to the MainProject\Packages\
folder. It should look something like this:
2. Create a script with the following code and attach it to the GameObject
that will survive the entire life cycle of the app.
You can find the AppID in the settings of the respective app in devtodev (Settings → SDK → Integration → Credentials).
config
- an object instance of DTDAnalyticsConfiguration
, which is used for specifying additional properties during the initialization.
DTDAnalyticsConfiguration
Example:
SDK Activity
The SDK can’t control app activity in case you use Windows Standalone therefore this responsibility is shifted to the developer. While initializing the SDK, the activity starts automatically and after that, the activity status will not auto-change. To track app activity, the developer can use the following methods: DTDAnalytics.StartActivity
and DTDAnalytics.StopActivity
. It is recommended to use the DTDAnalytics.StopActivity
method to stop activity when the app goes into the background or gets closed. You can use the DTDAnalytics.StartActivity
method to resume activity when the app gets reopened from the taskbar.
For other platforms, there is no need to manually call the DTDAnalytics.StartActivity
and DTDAnalytics.StopActivity
methods.
To integrate with Xcode, the SDK uses PostProcessBuild
in the DTDPostProcessAnalytics
and DTDPostProcessMessaging
scripts. If you use custom PostProcessBuild
scripts, add them callbackOrder
of less than 98
to avoid conflicts.
If you want to disable tracking of advertising identifiers, you need to open the DTDPostProcesssAnalytics.cs
file and comment out the line 39
.
is the easiest way to add devtodev into your iOS project.
1. Firstly, install CocoaPods using:
2. In the project directory execute the command:
3. In the created Podfile add the dependency:
4. Finally, run the command in your Xcode project directory:
CocoaPods should download and install the devtodev library, and create a new Xcode workspace. Open this workspace in Xcode.
In progress...
3. Add frameworks:
AppTrackingTransparency.framework
AdSupport.framework
4. Add initialization todidFinishLaunchingWithOptions
method:
An App ID can be found in the settings of the respective app in devtodev (Settings → SDK → Integration → Credentials).
config
- an object instance of DTDAnalyticsConfiguration
, which is used for specifying additional properties during the initialization.
DTDAnalyticsConfiguration
Example:
Create Bridging-Header. To do this, you need to add any swift file to the project (don’t delete it later) and choose ‘Create Bridging Header’ in the offered dialog box.
Make sure that the ‘Build Settings’ for ‘Defines Module’ value evaluates to ‘YES’.
While importing, use: #import <DTDAnalytics/DTDAnalytics-Swift.h>
For SDK to function properly, it needs to be integrated at the earliest moment of the app launch. It is recommended that you use the following method of main entry point initialization:
Member | Type | Description |
---|
Member | Type | Description |
---|
Member | Type | Description |
---|
Member | Type | Description |
---|
Member | Type | Description |
---|
Member | Type | Description |
---|
Member | Type | Description |
---|
Member | Type | Description |
---|
Add the following strings to proguard.txt ():
Your app must request tracking authorization before it can get the advertising identifier. See on how to request it.
1.
2. Add DTDAnalytics.xcframework
to the project (with Do Not Embed specified)
Parameter
Type
Description
currentLevel
int
The player level at the moment of devtodev SDK initialization. It is recommended (but optional) to use to improve data precision.
userId
string
A custom user identifier provided by the developer. If you utilize the default calculation by the device ID, this identifier can be used for finding a user in devtodev.
In case your project utilizes the calculation by the user identifier, you must set this parameter because it becomes the main user identifier in devtodev.
trackingAvailability
DTDTrackingStatus (enum)
The property allows or disallows devtodev tracking of the user. By default, it is set to DTDTrackingStatus.enable
. SDK stores the previously assigned value. Pass DTDTrackingStatus.disable
if the user opted out of tracking in line with GDPR.
logLevel
DTDLogLevel (enum)
The level of logging the SDK activity. The DTDLogLevel.no
value is used by default. For troubleshooting during integration it is recommended to set it to DTDLogLevel.debug
, and either switch it off DTDLogLevel.no
or use it only for error handling DTDLogLevel.error
in the release version.
Parameter
Type
Description
currentLevel
Integer
The player level at the moment of devtodev SDK initialization. It’s optional but we recommend using it for improving data accuracy.
userId
String
A custom user ID assigned by the developer. In the case of default calculation by device IDs, the identifier can be used for searching users in devtodev. In case the project uses calculation by user IDs, the parameter is mandatory because it becomes the principal calculation ID in devtodev.
trackingAvailability
DTDTrackingStatus (enum)
The property allows or disallows devtodev tracking of the user. By default, it is set to DTDTrackingStatus.enable
. SDK stores the previously assigned value. Pass DTDTrackingStatus.disable
if the user opted out of tracking in line with GDPR.
logLevel
DTDLogLevel (enum)
The level of logging the SDK activity. The DTDLogLevel.no
value is used by default. For troubleshooting during integration it is recommended to set it to DTDLogLevel.debug
, and either switch it off DTDLogLevel.no
or use it only for error handling DTDLogLevel.error
in the release version.
Parameter
Type
Description
currentLevel
Integer
The player level at the moment of devtodev SDK initialization. It’s optional but we recommend using it for improving data accuracy.
userId
String
A custom user ID assigned by the developer. In the case of default calculation by device IDs, the identifier can be used for searching users in devtodev. In case the project uses calculation by user IDs, the parameter is mandatory because it becomes the principal calculation ID in devtodev.
trackingAvailability
DTDTrackingStatus (enum)
The property allows or disallows devtodev tracking of the user. By default, it is set to DTDTrackingStatus.Enable
. SDK stores the previously assigned value. Pass DTDTrackingStatus.Disable
if the user opted out of tracking in line with GDPR.
logLevel
DTDLogLevel (enum)
The level of logging the SDK activity. The DTDLogLevel.No
value is used by default. For troubleshooting during integration, it is recommended to set it to DTDLogLevel.Debug
, and either switch it off DTDLogLevel.No
or use it only for error handling DTDLogLevel.Error
in the release version.
Parameter
Type
Description
currentLevel
Integer
The player level at the moment of devtodev SDK initialization. It’s optional but we recommend using it for improving data accuracy.
userId
String
A custom user ID assigned by the developer. In the case of default calculation by device IDs, the identifier can be used for searching users in devtodev. In case the project uses calculation by user IDs, the parameter is mandatory because it becomes the principal calculation ID in devtodev.
trackingAvailability
DTDTrackingStatus (enum)
The property allows or disallows devtodev tracking of the user. By default, it is set to DTDTrackingStatus.Enabl
e
. SDK stores the previously assigned value. Pass DTDTrackingStatus.Disable
if the user opted out of tracking in line with GDPR.
logLevel
DTDLogLevel (enum)
The level of logging the SDK activity. The DTDLogLevel.No
value is used by default. For troubleshooting during integration, it is recommended to set it to DTDLogLevel.Debug
, and either switch it off DTDLogLevel.No
or use it only for error handling DTDLogLevel.Error
in the release version.
ApplicationVersion
String
The app version during the devtodev SDK initialization. It is recommended that you set the app version before the initialization to make the collection of app version statistics more precise.
Parameter
Type
Description
userId
string
Unique user identifier. For example, user’s ID in a social network, or a unique account name used for user identification on your server. If at the time of initialization this identifier is not yet available, specify the identifier later using
the setUserId
method.
currentLevel
integer
The player level at the moment of devtodev SDK initialization. It’s optional but we recommend using it for improving data accuracy.
trackingAvailability
boolean
The property allows or disallows devtodev tracking of the user. By default, it is set to true
. SDK stores the previously assigned value. Pass false if the user opted out of tracking in line with GDPR.
logLevel
string
The level of logging the SDK activity. The "No
" value is used by default. For troubleshooting during integration, it is recommended to set it to "Debug
", and either switch it "No
" or use it only for error handling "Error
" in the release version.
| bool | Option label |
| int32 | Parameter value |
| bool | Option label |
| FString | Parameter value |
| EDTDLogLevel | Logging level |
| FDTDOptionalInt32 | Current level |
| FDTDOptionalString | User ID |
| FDTDOptionalString | Application version (Windows) |
| EDTDTrackingStatus | Tracking settings |
| TMap<FString, FString> | String parameters |
| TMap<FString, int64> | Integer parameters |
| TMap<FString, float> | Real parameters (floating-point numbers) |
| TMap<FString, bool> | Boolean parameters |
| FDTDOptionalInt32 | Difficulty |
| FDTDOptionalString | Source |
| 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 |
| FString | You can find it in the settings of the corresponding application in devtodev (Settings → SDK → Integration → Credentials) |
| FString | You can find it in the settings of the corresponding application in devtodev (Settings → SDK → Integration → Credentials) |
| FDTDAnalyticsConfiguration | Initialization parameters |
Parameter | Type | Description |
| Integer | The player level at the moment of devtodev SDK initialization. It’s optional but we recommend using it for improving data accuracy. |
| String | A custom user ID assigned by the developer. In the case of default calculation by device IDs, the identifier can be used for searching users in devtodev. In case the project uses calculation by user IDs, the parameter is mandatory because it becomes the principal calculation ID in devtodev. |
| DTDTrackingStatus (enum) | The property allows or disallows devtodev tracking of the user. By default, it is set to |
| DTDLogLevel (enum) | The level of logging the SDK activity. The |
| String | The app version during the devtodev SDK initialization. Use the property on the WinStandalone platform only. For all other platforms, data is collected automatically. |
Parameter | Type | Description |
| int | The player level at the moment of devtodev SDK initialization. It is recommended (but optional) to use to improve data precision. |
| string | A custom user identifier provided by the developer. If you utilize the default calculation by the device ID, this identifier can be used for finding a user in devtodev. In case your project utilizes the calculation by the user identifier, you must set this parameter because it becomes the main user identifier in devtodev. |
| DTDTrackingStatus (enum) | The property allows or disallows devtodev tracking of the user. By default, it is set to |
| DTDLogLevel (enum) | The level of logging the SDK activity. The |