Connecting to social network
/**
* Tracks the existence of a connection with a social network.
* Use pre-defined or custom values as an identifier.
* @param {string} socialNetwork - social network id (max. 24 symbols)
**/
devtodev.socialNetworkConnect(socialNetwork);
We recommend using the following values for the most popular social networks:
Value |
Social Network |
Value |
Social Network |
---|---|---|---|
en |
Evernote |
rt |
|
fb |
|
rr |
Renren |
gm |
Google Mail |
tb |
Tumblr |
gp |
Google+ |
tw |
|
in |
|
vk |
VK |
ok |
Odnoklassniki |
vb |
Viber |
pi |
|
wp |
|
|
Qzone |
Posting to social network
Track publications to social networks from the app to improve viral marketing efficiency.The event is sent after the social network confirms the publication.
/**
* Tracks the existence of posts to a social network.
* @param {string} socialNetwork - social network Id (max. 24 symbols)
* @param {string} reason - the reason of posting (max. 32 symbols)
*/
devtodev.socialNetworkPost(socialNetwork, reason);
As a «reason» parameter we recommend that you indicate actions which encourage users to make publication.
For example:
|
and so on... |
We recommend using the following values for the most popular social networks:
Value |
Social Network |
Value |
Social Network |
---|---|---|---|
en |
Evernote |
rt |
|
fb |
|
rr |
Renren |
gm |
Google Mail |
tb |
Tumblr |
gp |
Google+ |
tw |
|
in |
|
vk |
VK |
ok |
Odnoklassniki |
vb |
Viber |
pi |
|
wp |
|
|
Qzone |
Debug mode
To enable the debug mode and make SDK notifications displayed in the console use this method:
/**
* Activates console log
* @param {boolean} status
*/
devtodev.setDebugLog(status);
Forced sending
To send events pack before it is filled or before its formation period you can use immediate dispatch:
/**
* Sends event packet immediately
*/
devtodev.sendBufferedEvents();
Current SDK version
To get the version of integrated SDK use this method:
/**
* Returns SDK version
*/
devtodev.getSdkVersion();
Tracking state (GDPR)
The method of limiting the processing of user data. The right to be forgotten.
/**
* The method of limiting the processing of user data. The right to be forgotten.
* @param {boolean} status - send 'false' to erase user's personal data and stop collecting data of this user.
* Send 'true' if you want to resume data collection.
*/
devtodev.setTrackingAvailability(status);