Web
To integrate your web application with devtodev system please perform the following actions:
Add the application to the Space using the wizard for adding application
To integrate SDK add the following line to the tag of your page.
Initialization
In order for SDK for WEB to start working, it is necessary to perform initialization right after the page is loaded and you have basic user identifier at your disposal.
Attention! In case User ID is changed after SDK was initiated, the method should be called repeatedly with indication of the new User ID. (For example, when user signs into another account in a launched messenger application).
If user has no unique identifier (say, if it is possible to use your application / site without authorization), but you need to get stats for such users, don't set userId during the initialization or set the empty string ("") or null as value of userId. DK will assign the unique identifier to user. This identifier will we used until the real identifier assigns to the user.
Unique API key can be found in the application settings (“My apps” → App Name → “Settings” → “Integration”).
Cross-platform application Initialization
In cross-platform applications the additional user identifier can be used. It is user cross-platform ID which is unique for all of the platforms. And if cross-platform ID differs from the ID which is main for the platform, you need to set the cross-platform ID. The cross-platform ID combines the user data for cross-platform project.
We recommend you to apply this method before the SDK initialization, otherwise the user identiticator from the previous session will be used since the SDK initialization moment till the setCrossplatformUserId method call.
If it is difficult to do, set the cross-platform ID as soon as it will be available in the application after SDK initialization.
Attention! If your application allows user to relogin (changing the user during the working session of application), then the setCrossplatformUserId method should be called just after the authorization. You don't need to call the SDK initialization one more time.
Additional initialization
For the most precise data collection, we strongly recommend specifying some information about the user right after SDK is initiated.
User data initialization
In the first place this additional initialization is required for gaming applications where the player has a game level as a characteristic.
Application data initialization
Method is not obligatory, but if you want to have an ability to build reports with regard to the version of your application, use this method.
Debug mode
To enable the debug mode and make SDK notifications displayed in the console use this method:
Last updated