Initial referrer tracking
Automated referral parameters are available on WebGL and Android platforms. Unfortunately, other platforms do not provide any capability to pass a referrer string through to your app from a link to the store. But if you have a referral info, you can set it using the method below:
/// <summary> Initial referrer tracking <summary>
/// <example> Usage:
/// <code>
/// Dictionary<ReferralProperty, string> referralData = new Dictionary<ReferralProperty, string>();
/// referralData.Add(ReferralProperty.Source, "source");
/// referralData.Add(ReferralProperty.Medium, "medium");
/// referralData.Add(ReferralProperty.Content, "content");
/// referralData.Add(ReferralProperty.Campaign, "campaign");
/// referralData.Add(ReferralProperty.Term, "term");
/// referralData.Add(ReferralProperty.Custom("site"), "site");
/// DevToDev.Analytics.Referral(referralData);
/// </code>
/// </example>
/// <param name="referralData"> Dictionary with referrer values </param>
DevToDev.Analytics.Referral(Dictionary<ReferralProperty, string> referralData);
The list of predefined keys:
// To identify a search engine, newsletter name, or other source.
// (for example 'AdWords', 'Bing', 'E-Mail Newsletter')
ReferralProperty.Source;
// To identify a medium such as email or cost-per-install.
// (for example 'CPI')
ReferralProperty.Medium;
// To identify a specific product promotion or strategic campaign.
// (for example 'Snow Boots')
ReferralProperty.Campaign;
// 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')
ReferralProperty.Content;
// To note the keywords for this ad.
// (for example 'shoes+boots')
ReferralProperty.Term;
// To add a custom key
ReferralProperty.Custom("your_key_name");
Connecting to social network
/// <summary> Track the existence of a connection with a social network.
/// Use pre-defined or custom values as an identifier.</summary>
/// <param name="socialNetwork"> Social network ID </param>
DevToDev.Analytics.SocialNetworkConnect(DevToDev.SocialNetwork socialNetwork);
Use the current constants to specify social network:
DevToDev.SocialNetwork.Facebook
DevToDev.SocialNetwork.Twitter
DevToDev.SocialNetwork.GooglePlus
DevToDev.SocialNetwork.Vk
// and so on...
Otherwise, create your own social network object.
DevToDev.SocialNetwork socialNetwork = DevToDev.SocialNetwork.Custom(string networkName); //(max. 24 symbols)
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.
/// <summary> Track the existence of posts to a social network. </summary>
/// <param name="networkName"> Social network ID </param>
/// <param name="reason"> The reason of posting. (max. 32 symbols)</param>
DevToDev.Analytics.SocialNetworkPost(DevToDev.SocialNetwork networkName, string reason);
As a «reason» parameter we recommend that you indicate actions which encourage users to make publication.
For example:
|
and so on... |
Use the current constants to specify social network:
DevToDev.SocialNetwork.Facebook
DevToDev.SocialNetwork.Twitter
DevToDev.SocialNetwork.GooglePlus
DevToDev.SocialNetwork.Vk
// and so on...
Otherwise, create your own social network object.
DevToDev.SocialNetwork socialNetwork = DevToDev.SocialNetwork.Custom(string networkName); //(max. 24 symbols)
OpenUdid
Property allows to get UDID:
DevToDev.Analytics.OpenUdid
ODIN1
Property allows to get ODIN:
DevToDev.Analytics.Odin1
Debug mode
To enable the debug mode and make SDK notifications displayed in the console use this method:
/// <summary> Enable/Disable log</summary>
/// <param name="isEnabled">Enabled/Disabled log</param>
DevToDev.Analytics.SetActiveLog(bool isEnabled);
Forced sending
To send events pack before it is filled or before its formation period you can use immediate dispatch:
DevToDev.Analytics.SendBufferedEvents();
Set app version
To set set current application version in WEB and Windows Standalone apps use this property:
/// <summary> Property allows to set current application version.
/// Attention! This property is necessary for WEB and Windows Standalone apps only.
/// It will be ignored on other platforms.
/// </summary>
/// <param name="version"> Current version of your application </param>
DevToDev.Analytics.ApplicationVersion = version;
Tracking state (GDPR)
The method of limiting the processing of user data. The right to be forgotten.
/**
* The property of limiting the processing of user data. The right to be forgotten.
* Use 'false' to erase user's personal data and stop collecting data of this user or 'true'
* if you want to resume data collection.</summary>
*/
DevToDev.Analytics.TrackingAvailability = false/true;