Cordova SDK Secondary Methods

Attention! The support of the SDK for this platform has been suspended!


Initial referrer tracking

Unfortunately, Apple does not provide any capability to pass a referrer string through to your app from a link to the app store. But if you have a referral info, you can set it using the method below:

/**
 * Tracks user's referral data
 * ### Parameters:
 * data = {
 *     'Source': 'source',     // To identify a search engine, newsletter name, or other source.
 *                             // (for example 'AdWords', 'Bing', 'E-Mail Newsletter')
 *     'Medium': 'medium',     // To identify a medium such as email or cost-per-install.
 *                             // (for example 'CPI')
 *     'Content': 'content',   // To differentiate ads or links that point to the same URL.
 *                             //(for example some ads might advertise 'Warm Snow Boots' and 
 *                             // others might advertise 'Durable Snow Boots')
 *     'Campaign': 'campaign', // To identify a specific product promotion or strategic campaign.
 *                             // (for example 'Snow Boots')
 *     'Term': 'term'          // To note the keywords for this ad.
 *                             // for example 'shoes+boots')
 * };
 * 
 */

plugins.devtodev.referrer(data);

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)
**/

plugins.devtodev.socialNetworkConnect(socialNetwork);

We recommend using the following values for the most popular social networks:

Value

Social Network

Value

Social Network

en

Evernote

rt

Reddit

fb

Facebook

rr

Renren

gm

Google Mail

tb

Tumblr

gp

Google+

tw

Twitter

in

LinkedIn

vk

VK

ok

Odnoklassniki

vb

Viber

pi

Pinterest

wp

WhatsApp

qq

Qzone

   


Posting to social network

Track publications in social networks and analyze the effectiveness of viral messages. 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)
*/

plugins.devtodev.socialNetworkPost(socialNetwork, reason);

As a «reason» parameter we recommend that  you indicate actions which encourage users to make publication.

For example:

  • Start playing

  • New level reached

  • New building

  • New ability

  • Quest completed

  • New item

  • Collection completed

  • Invitation

  • Asking for help
  • New Record

  • AchiŠµvement

  • URL sharing

  • Recommendation

  • Review

and so on...

We recommend using the following values for the most popular social networks:

Value

Social Network

Value

Social Network

en

Evernote

rt

Reddit

fb

Facebook

rr

Renren

gm

Google Mail

tb

Tumblr

gp

Google+

tw

Twitter

in

LinkedIn

vk

VK

ok

Odnoklassniki

vb

Viber

pi

Pinterest

wp

WhatsApp

qq

Qzone

   

Debug mode

To enable the debug mode and make SDK notifications displayed in the console use this method:

/**
* Activates console log
* @param {boolean} isActiveLog
*/

plugins.devtodev.setActiveLog(isActiveLog);

Forced sending

To send events pack before it is filled or before its formation period you can use immediate dispatch:

/**
* Sends events packet immediately
*/

plugins.devtodev.sendBufferedEvents();

Tracking state (GDPR)

The method of limiting the processing of user data. The right to be forgotten.

This method is implemented in accordance with the GDPR requirements.
In case a user doesn’t want their data to be sent and processed in the devtodev system, a developer must send a ’false’ value to this method.
When calling the method setTrackingAvailability with a ‘false’ value, SDK sends a command to the server to delete all user’s personal data that has been collected by devtodev from this app and a command to block the collection of any data of this user in future, and then stops sending any messages to the devtodev system.
The user will remain listed as an impersonal unit in previously aggregated metrics.
When sending a ‘true’ value, the permission to block data collection is removed.
/**
* The method of limiting the processing of user data. The right to be forgotten.
* @param {boolean} isAvailable - send 'false' to erase user's personal data and stop collecting data of this user.
* Send 'true' if you want to resume data collection.
*/
plugins.devtodev.setTrackingAvailability(isAvailable);
User profile
Checking the events