Please do the following to integrate your web application with devtodev:
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:
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.
In case User ID is changed after SDK was initiated, the method should be called repeatedly with indication of a new User ID. For example, when user signs into another account in a launched messenger application.
If a user has no unique identifier, e.g. 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 an empty string ("") or null as value of userId. SDK will assign the unique identifier to the user. This identifier will be used until the real identifier assigns to the user.
Unique API key can be found in the application settings: "Settings" → "SDK" → "Integration".
In cross-platform applications, the additional user identifier can be used. It is a user cross-platform ID which is unique for all of the platforms. And if a cross-platform ID differs from the ID that is main for the platform, you need to set the cross-platform ID. The cross-platform ID combines the user data for a cross-platform project.
We recommend you apply this method before the SDK initialization, otherwise, the user identifier from the previous session will be used since the SDK initialization moment till the setCrossplatformUserId method call.
If it is difficult to do, set a cross-platform ID as soon as it is available in the application after SDK initialization.
If your application allows user to re-login (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.
For the most precise data collection, we strongly recommend specifying some information about the user right after SDK is initiated.
In the first place, this additional initialization is required for gaming applications where the player has a game level as a characteristic.
It is not obligatory, but if you want to have the ability to build reports with regard to the version of your application, use this method before initialization.
To enable the debug mode and make SDK notifications displayed in the console, use this method: