# Secondary methods

{% hint style="danger" %}
**This generation of SDK is deprecated and is no longer supported.**\
Information about the [current version can be found here](/integration/integration-of-sdk-v2/setting-up-events/secondary-methods.md).
{% endhint %}

## Initial referrer tracking

{% tabs %}
{% tab title="iOS" %}
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:

```objectivec
/**
 * Tracks user's referral data
 * ### Usage:
 *    [DevToDev referrer:@{
 *       RFSource: @"adwords",
 *       RFMedium: @"cpi",
 *       RFContent: @"Snow Boots",
 *       RFCampaign: @"Warm Snow Boots",
 *       RFTerm: @"snow boots"
 *    }];
 * 
 * @param NSDictionary<ReferralProperty*, NSString*> utm - Dictionary with referrer values
 */
[DevToDev referrer: (NSDictionary<ReferralProperty*, NSString*> *) utm];
```

The list of predefined keys:

```objectivec
//To identify a search engine, newsletter name, or other source.
// (for example 'AdWords', 'Bing', 'E-Mail Newsletter')
ReferralProperty * RFSource;

//To identify a medium such as email or cost-per-install.
// (for example 'CPI')
ReferralProperty * RFMedium;

//To identify a specific product promotion or strategic campaign.
//(for example 'Snow Boots')
ReferralProperty * RFCampaign;

//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 * RFContent;

//To note the keywords for this ad.
// for example 'shoes+boots')
ReferralProperty * RFTerm;

//To add a custom key
[ReferralProperty Custom:@"your_key_name"];
```

{% endtab %}

{% tab title="Android" %}

{% endtab %}

{% tab title="Windows 8.1 and 10" %}
Unfortunately, Windows Store does 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:

```csharp
/**
 * ### Usage:
 *     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.SDK.Referral(referralData);
 *
 * <param name="referralData">Dictionary with referrer values</param>
 */
DevToDev.SDK.Referral(Dictionary<ReferralProperty, string> referralData);
```

The list of predefined keys:

```csharp
//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");
```

{% endtab %}

{% tab title="Web" %}

{% endtab %}

{% tab title="Unity" %}
Automated referral parameters are available on Android platform. 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:

```csharp
/// <summary> Initial referrer tracking <summary>
/// <example> Usage:
/// 
///     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);
/// 
/// </example>
/// <param name="referralData"> Dictionary with referrer values </param>
DevToDev.Analytics.Referral(Dictionary<ReferralProperty, string> referralData);
```

The list of predefined keys:

```csharp
// 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");
```

{% endtab %}

{% tab title="Mac OS" %}
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:

```objectivec
/**
 * Tracks user's referral data
 * ### Usage:
 *    [DevToDev referrer:@{
 *       RFSource: @"adwords",
 *       RFMedium: @"cpi",
 *       RFContent: @"Snow Boots",
 *       RFCampaign: @"Warm Snow Boots",
 *       RFTerm: @"snow boots"
 *    }];
 * 
 * @param NSDictionary<ReferralProperty*, NSString*> utm - Dictionary with referrer values
 */
[DevToDev referrer: (NSDictionary<ReferralProperty*, NSString*> *) utm];
```

The list of predefined keys:

```objectivec
//To identify a search engine, newsletter name, or other source.
// (for example 'AdWords', 'Bing', 'E-Mail Newsletter')
ReferralProperty * RFSource;

//To identify a medium such as email or cost-per-install.
// (for example 'CPI')
ReferralProperty * RFMedium;

//To identify a specific product promotion or strategic campaign.
//(for example 'Snow Boots')
ReferralProperty * RFCampaign;

//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 * RFContent;

//To note the keywords for this ad.
// for example 'shoes+boots')
ReferralProperty * RFTerm;

//To add a custom key
[ReferralProperty Custom:@"your_key_name"];
```

{% endtab %}

{% tab title="Adobe Air" %}
Automated referral parameters is available on Android platform. 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:

```javascript
/**
* ### Usage:
*     var referralData:Dictionary = new Dictionary();
*     referralData[ReferralProperty.Source] = "source";
*     referralData[ReferralProperty.Medium] = "medium";
*     referralData[ReferralProperty.Content] = "content";
*     referralData[ReferralProperty.Campaign] = "campaign";
*     referralData[ReferralProperty.Term] = "term";
*     referralData[ReferralProperty.Custom("site")] = "site";
*     DevToDev.referral(referralData);
*
* @ param referralData - dictionary with referrer values
*/
DevToDev.referral(referralData:Dictionary);
```

```
The list of predefined keys:
```

```javascript
// 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");
```

{% endtab %}

{% tab title="UE4" %}
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:

**Blueprint**

![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LnBolWcwPO33iga2rY2%2F-LnTASe7tY_8XGfgeRsv%2F-LnTAUvoKzKCb7guBr_O%2F143-secondarymethods-0.png?generation=1567095659196400\&alt=media)

| Field    | Type    | Description                                                                                                                                                        |
| -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Source   | FString | To identify a search engine, newsletter name, or other source. (for example 'AdWords', 'Bing', 'E-Mail Newsletter')                                                |
| Medium   | FString | To identify a medium such as email or cost-per-install. (for example 'CPI')                                                                                        |
| Campaign | FString | To identify a specific product promotion or strategic campaign. (for example 'Snow Boots')                                                                         |
| Content  | FString | 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') |
| Term     | FString | To note the keywords for this ad. for example 'shoes+boots')                                                                                                       |

**Code**

```cpp
UDevToDevBlueprintFunctionLibrary::Referrer(const TArray<FAnalyticsEventAttr>& Attributes);
```

{% endtab %}
{% endtabs %}

## **Connecting to social networks**

{% tabs %}
{% tab title="iOS" %}

```objectivec
/**
* Tracks the existence of a connection with a social network. 
* Use pre-defined or custom values as an identifier.
* @param SocialNetwork socialNetwork - social network id
*/
[DevToDev socialNetworkConnect: (SocialNetwork *) socialNetwork];javascript:void(0)
```

Use the current constants to specify a social network:

```objectivec
Facebook
Twitter
GooglePlus
VK
//and so on...
```

Otherwise, create an object with the social network name you need.

```objectivec
SocialNetwork  socialNetwork = [SocialNetwork Custom: (NSString *) networkName]; (max. 24 symbols)
```

{% endtab %}

{% tab title="Android" %}

```java
/**
* Tracks the existence of a connection with a social network.
* Use pre-defined or custom values as an identifier.
* @param SocialNetwork socialNetwork - social network id
*/
DevToDev.socialNetworkConnect(SocialNetwork socialNetwork);
```

**Use the current constants to specify a social network:**

* SocialNetwork.Facebook
* SocialNetwork.Twitter
* SocialNetwork.GooglePlus
* SocialNetwork.Vk
* and so on...

Otherwise, create your own social network object.

```java
/**
* Custom social network object
* @param networkName - social network name (max. 24 symbols)
*/
SocialNetwork socialNetwork = SocialNetwork.Custom(String networkName);
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}

```csharp
/**
* Tracks the existence of a connection with a social network.
* Use pre-defined or custom values as an identifier.
* <param name="socialNetwork"> Social network ID </param>
*/
DevToDev.SDK.SocialNetworkConnect(SocialNetwork socialNetwork);
```

Example:

```csharp
DevToDev.SDK.SocialNetworkConnect(SocialNetwork.Facebook);
```

Use the current constants to specify social network:

SocialNetwork.Facebook\
SocialNetwork.Twitter\
SocialNetwork.GooglePlus\
SocialNetwork.Vk\
and so on...

Otherwise, create social network the object of your own:

```
SocialNetwork socialNetwork = SocialNetwork.Custom(string networkName); //(max. 24 symbols)
```

{% endtab %}

{% tab title="Web" %}

```javascript
/**
* 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    | 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          |       |                |
| {% endtab %} |                |       |                |

{% tab title="Unity" %}

```csharp
/// <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:

```csharp
DevToDev.SocialNetwork.Facebook
DevToDev.SocialNetwork.Twitter
DevToDev.SocialNetwork.GooglePlus
DevToDev.SocialNetwork.Vk
// and so on...
```

Otherwise, create your own social network object.

```csharp
DevToDev.SocialNetwork socialNetwork = DevToDev.SocialNetwork.Custom(string networkName); //(max. 24 symbols)
```

{% endtab %}

{% tab title="Mac OS" %}

```objectivec
/**
* Tracks the existence of a connection with a social network. Use pre-defined or custom values as an identifier.
* @param SocialNetwork socialNetwork - social network id
*/
[DevToDev socialNetworkConnect: (SocialNetwork *) socialNetwork];
```

Use the current constants to specify social network:

```objectivec
Facebook
Twitter
GooglePlus
VK
//and so on...
```

Otherwise, create social network the object of your own.

```objectivec
SocialNetwork  socialNetwork = [SocialNetwork Custom: (NSString *) networkName]; //max. 24 symbols
```

{% endtab %}

{% tab title="Adobe Air" %}

```javascript
/**
* Tracks the existence of a connection with a social network.
* Use pre-defined or custom values as an identifier.
* @param socialNetwork - social network id
*/
DevToDev.socialNetworkConnect(socialNetwork:SocialNetwork);
```

Use the current constants to specify social network:

```java
SocialNetwork.VK;
SocialNetwork.TWITTER;
SocialNetwork.FACEBOOK;
SocialNetwork.GOOGLE_PLUS;
SocialNetwork.WHATS_APP;
SocialNetwork.VIBER;
SocialNetwork.EVERNOTE;
SocialNetwork.GOOGLE_MAIL;
SocialNetwork.LINKED_IN;
SocialNetwork.PINTEREST;
SocialNetwork.QZONE;
SocialNetwork.REDDIT;
SocialNetwork.RENREN;
SocialNetwork.TUMBLR;
```

Otherwise, create your own social network object:

```javascript
/**
* Custom social network object
* @param networkName - social network name (max. 24 symbols)
*/
var socialNetwork:SocialNetwork = SocialNetwork.Custom(networkName:String);
```

{% endtab %}

{% tab title="UE4" %}
Blueprint

![](/files/-LnlSiDyqXJunBncBiSC)

| **Field**   | **Type** | **Description**   |
| ----------- | -------- | ----------------- |
| Social Name | FString  | Social network Id |

### Code

```cpp
// Tracks the existence of a connection with a social network.
// Use pre-defined or custom values as an identifier.
// FString socialNetwork - social network id (max. 24 symbols)

UDevToDevBlueprintFunctionLibrary::SocialNetworkConnect(const FString& 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          |       |                |
| {% endtab %}  |                |       |                |
| {% endtabs %} |                |       |                |

## **Posting to social networks**

Track publications in social networks and analyze the effectiveness of viral messages. The event is sent after a social network confirms the publication.

{% tabs %}
{% tab title="iOS" %}

```objectivec
/**
* Tracks the existence of posts to a social network.
* @param socialNetwork - social network Id
* @param NSString reason - the reason of posting (max. 32 symbols)
*/
[DevToDev socialNetworkPost: (SocialNetwork *) socialNetwork withReason: (NSString *) reason];
```

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

| <p>For example:</p><ul><li>Start playing</li><li>New level reached</li><li>New building</li><li>New ability</li><li>Quest completed</li><li>New item</li><li>Collection completed</li><li>Invitation</li></ul> | <ul><li>Asking for help</li><li>New Record</li><li>Achievement</li><li>URL sharing</li><li>Recommendation</li><li>Review</li></ul><p>and so on...</p> |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |

```objectivec
Facebook
Twitter
GooglePlus
VK
//and so on...
```

Otherwise, create an object with the social network name you need.

```objectivec
SocialNetwork  socialNetwork = [SocialNetwork Custom: (NSString *) networkName];
// networkName (max. 24 symbols)
```

{% endtab %}

{% tab title="Android" %}

```java
/**
* Tracks the existence of posts to a social network.
* @param socialNetwork - social network Id
* @param reason - the reason of posting (max. 32 symbols)
*/
DevToDev.socialNetworkPost(SocialNetwork socialNetwork, String reason);
```

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

For example:

* Start playing
* New level reached
* New building
* New ability
* Quest completed
* New item
* Collection completed
* Invitation
* Asking for help
* New Record
* Acheivement
* URL sharing
* Recommendation
* Review
* and so on...

Use the current constants to specify a social network:

* SocialNetwork.Facebook
* SocialNetwork.Twitter
* SocialNetwork.GooglePlus
* SocialNetwork.Vk
* and so on...

Otherwise, create your own social network object.

```java
/**
* Custom social network object
* @param networkName - social network name (max. 24 symbols)
*/
SocialNetwork socialNetwork = SocialNetwork.Custom(String networkName);
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}
The social network ID is the same as with DevToDev.SDK.SocialNetworkConnect(). It is possible to use pre-defined or custom values as the reason (pReason parameter) .

```csharp
/**
*  <param name="networkName"> Social network ID </param>
*  <param name="reason"> The reason of posting. (max. 32 symbols)</param>
*/
DevToDev.SDK.SocialNetworkPost(SocialNetwork socialNetwork, String reason)
```

Example:

```csharp
DevToDev.SDK.SocialNetworkPost(SocialNetwork.Facebook, "newLevelReached");
```

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
* Acheivement
* URL sharing
* Recommendation
* Review

and so on...

Use the current constants to specify social network:

SocialNetwork.Facebook\
SocialNetwork.Twitter\
SocialNetwork.GooglePlus\
SocialNetwork.Vk\
and so on...

Otherwise, create social network the object of your own:

```csharp
SocialNetwork socialNetwork = SocialNetwork.Custom(string networkName); //(max. 24 symbols)
```

{% endtab %}

{% tab title="Web" %}

```
/**
* 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.

| <p>For example:</p><ul><li>Start playing</li><li>New level reached</li><li>New building</li><li>New ability</li><li>Quest completed</li><li>New item</li><li>Collection completed</li><li>Invitation</li></ul> | <ul><li>Asking for help</li><li>New Record</li><li>Achiеvement</li><li>URL sharing</li><li>Recommendation</li><li>Review</li></ul><p>and so on...</p> |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |

| 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          |       |                |
| {% endtab %} |                |       |                |

{% tab title="Unity" %}

```csharp
/// <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:

* Start playing
* New level reached
* New building
* New ability
* Quest completed
* New item
* Collection completed
* Invitation
* Asking for help
* New Record
* Acheivement
* URL sharing
* Recommendation
* Review

and so on...

Use the current constants to specify social network:

```csharp
DevToDev.SocialNetwork.Facebook
DevToDev.SocialNetwork.Twitter
DevToDev.SocialNetwork.GooglePlus
DevToDev.SocialNetwork.Vk
// and so on...
```

Otherwise, create your own social network object.

```csharp
DevToDev.SocialNetwork socialNetwork = DevToDev.SocialNetwork.Custom(string networkName); //(max. 24 symbols)
```

{% endtab %}

{% tab title="Mac OS" %}

```objectivec
/**
* Tracks the existence of posts to a social network.
* @param socialNetwork - social network Id
* @param reason - the reason of posting (max. 32 symbols)
*/
[DevToDev socialNetworkPost: (SocialNetwork *) socialNetwork withReason: (NSString *) 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
* Achievement
* URL sharing
* Recommendation
* Review

and so on...

Use the current constants to specify social network:

```objectivec
Facebook
Twitter
GooglePlus
VK
//and so on...
```

Otherwise, create social network the object of your own.

```objectivec
SocialNetwork  socialNetwork = [SocialNetwork Custom: (NSString *) networkName]; //max. 24 symbols
```

{% endtab %}

{% tab title="Adobe Air" %}

```javascript
/**
* Tracks the existence of posts to a social network.
* @param socialNetwork - social network Id
* @param reason - the reason of posting (max. 32 symbols)
*/
DevToDev.socialNetworkPost(socialNetwork:SocialNetwork, reason:String);
```

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
* Acheivement
* URL sharing
* Recommendation
* Review
* and so on...

Use the current constants to specify social network:

```javascript
SocialNetwork.VK;
SocialNetwork.TWITTER;
SocialNetwork.FACEBOOK;
SocialNetwork.GOOGLE_PLUS;
SocialNetwork.WHATS_APP;
SocialNetwork.VIBER;
SocialNetwork.EVERNOTE;
SocialNetwork.GOOGLE_MAIL;
SocialNetwork.LINKED_IN;
SocialNetwork.PINTEREST;
SocialNetwork.QZONE;
SocialNetwork.REDDIT;
SocialNetwork.RENREN;
SocialNetwork.TUMBLR;
```

Otherwise, create your own social network object:

```javascript
/**
* Custom social network object
* @param networkName - social network name (max. 24 symbols)
*/
var socialNetwork:SocialNetwork = SocialNetwork.Custom(networkName:String);
```

{% endtab %}

{% tab title="UE4" %}
Blueprint

![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LnBolWcwPO33iga2rY2%2F-LnTASe7tY_8XGfgeRsv%2F-LnTAUvsIEeg607aEc5u%2F143-secondarymethods-2.png?generation=1567095666609107\&alt=media)

| **Field**   | **Type** | **Description**                         |
| ----------- | -------- | --------------------------------------- |
| Social Name | FString  | Social network Id                       |
| Reason      | FString  | The reason of posting (max. 32 symbols) |

**Code**

```cpp
// Tracks the existence of posts to a social network.
// FString socialNetwork - social network Id
// FString reason - the reason of posting (max. 32 symbols)

UDevToDevBlueprintFunctionLibrary::SocialNetworkPost(const FString& socialNetwork, const FString& reason);
```

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

| <p>For example:</p><ul><li>Start playing</li><li>New level reached</li><li>New building</li><li>New ability</li><li>Quest completed</li><li>New item</li><li>Collection completed</li><li>Invitation</li></ul> | <ul><li>Asking for help</li><li>New Record</li><li>Achievement</li><li>URL sharing</li><li>Recommendation</li><li>Review</li></ul><p>and so on...</p> |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |

| 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          |       |                |
| {% endtab %}  |                |       |                |
| {% endtabs %} |                |       |                |

## OpenUdid

Property allows to get UDID:

{% tabs %}
{% tab title="iOS" %}

```objectivec
/**
* @return OpenUdid
*/
[DevToDev getOpenUdid];
```

{% endtab %}

{% tab title="Android" %}

```java
/**
* @return Open Udid
*/
DevToDev.getOpenUdid();
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}

```csharp
DevToDev.SDK.OpenUdid
```

{% endtab %}

{% tab title="Web" %}

{% endtab %}

{% tab title="Unity" %}

```csharp
DevToDev.Analytics.OpenUdid
```

{% endtab %}

{% tab title="Mac OS" %}

```objectivec
/**
* @return Open Udid
*/
[DevToDev getOpenUdid];
```

{% endtab %}

{% tab title="Adobe Air" %}

{% endtab %}

{% tab title="UE4" %}

{% endtab %}
{% endtabs %}

## ODIN1

Property allows to get ODIN:

{% tabs %}
{% tab title="iOS" %}

```objectivec
/**
* @return ODIN1
*/
[DevToDev getOdin1];
```

{% endtab %}

{% tab title="Android" %}

```java
/**
* @return ODIN1
*/
DevToDev.getOdin1();
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}

```csharp
DevToDev.SDK.ODIN
```

{% endtab %}

{% tab title="Web" %}

{% endtab %}

{% tab title="Unity" %}

```
DevToDev.Analytics.Odin1
```

{% endtab %}

{% tab title="Mac OS" %}

```objectivec
/**
* @return ODIN1
*/
[DevToDev getOdin1];
```

{% endtab %}

{% tab title="Adobe Air" %}

```javascript
/**
* @return ODIN1
*/
DevToDev.getOdin1();
```

{% endtab %}

{% tab title="UE4" %}

{% endtab %}
{% endtabs %}

## UUID

Property allows to get UUID:

{% tabs %}
{% tab title="iOS" %}

```objectivec
/**
* @return UUID
*/
[DevToDev getUUID];
```

{% endtab %}

{% tab title="Android" %}

```java
/**
* @return UUID
*/
DevToDev.getUUID();
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}

{% endtab %}

{% tab title="Web" %}

{% endtab %}

{% tab title="Unity" %}

{% endtab %}

{% tab title="Mac OS" %}

```objectivec
/**
* @return UUID
*/
[DevToDev getUUID];
```

{% endtab %}

{% tab title="Adobe Air" %}

{% endtab %}

{% tab title="UE4" %}

{% endtab %}
{% endtabs %}

## Debug mode

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

{% tabs %}
{% tab title="iOS" %}

```objectivec
/**
* @param BOOL isActive
*/
[DevToDev setActiveLog: (BOOL) isActive];
```

{% endtab %}

{% tab title="Android" %}

```java
/**
* @param logLevel
*/
DevToDev.setLogLevel(LogLevel logLevel);
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}

```csharp
//to enable logging
DevToDev.SDK.LogEnabled = true;

//to disable loging
DevToDev.SDK.LogEnabled = false;
```

{% endtab %}

{% tab title="Web" %}

```javascript
/**
* Activates console log
* @param {boolean} status
*/

devtodev.setDebugLog(status);
```

{% endtab %}

{% tab title="Unity" %}

```csharp
/// <summary> Enable/Disable log</summary>
/// <param name="isEnabled">Enabled/Disabled log</param>
DevToDev.Analytics.SetActiveLog(bool isEnabled);
```

{% endtab %}

{% tab title="Mac OS" %}

```objectivec
/**
* @param BOOL isActive
*/
[DevToDev setActiveLog: (BOOL) isActive];
```

{% endtab %}

{% tab title="Adobe Air" %}

```javascript
/**
* @param logLevel (set logLevel=1 to enable log, 0 to disable)
*/
DevToDev.setLogLevel(logLevel:int);
```

{% endtab %}

{% tab title="UE4" %}

{% endtab %}
{% endtabs %}

## Forced sending

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

{% tabs %}
{% tab title="iOS" %}

```objectivec
[DevToDev sendBufferedEvents];
```

{% endtab %}

{% tab title="Android" %}

```java
DevToDev.sendBufferedEvents();
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}

```csharp
DevToDev.SDK.sendBufferedEvents();
```

{% endtab %}

{% tab title="Web" %}

```javascript
/**
* Sends event packet immediately
*/

devtodev.sendBufferedEvents();
```

{% endtab %}

{% tab title="Unity" %}

```csharp
DevToDev.Analytics.SendBufferedEvents();
```

{% endtab %}

{% tab title="Mac OS" %}

```objectivec
[DevToDev sendBufferedEvents];
```

{% endtab %}

{% tab title="Adobe Air" %}

```javascript
DevToDev.sendBufferedEvents();
```

{% endtab %}

{% tab title="UE4" %}
![](https://blobscdn.gitbook.com/v0/b/gitbook-28427.appspot.com/o/assets%2F-LnBolWcwPO33iga2rY2%2F-LnTASe7tY_8XGfgeRsv%2F-LnTAUvv56Hds_Ds1Mf9%2F143-secondarymethods-3.png?generation=1567095659242860\&alt=media)

Code

```cpp
// Sends events pack before it is filled or before its formation period

FAnalytics::Get().GetDefaultConfiguredProvider()->FlushEvents();
```

To identify a specific product promotion or strategic campaign. (for example 'Snow Boots')
{% endtab %}
{% endtabs %}

## Current SDK version

To get the version of integrated SDK, use the following method:

{% tabs %}
{% tab title="iOS" %}

```objectivec
/**
* @return SDKVersion
*/
[DevToDev sdkVersion];
```

{% endtab %}

{% tab title="Android" %}

```java
/**
* @return SDKVersion
*/
DevToDev.getSdkVersion();
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}

```csharp
DevToDev.SDK.GetSdkVersion();
```

{% endtab %}

{% tab title="Web" %}

```javascript
/**
* Returns SDK version
*/

devtodev.getSdkVersion();
```

{% endtab %}

{% tab title="Unity" %}

{% endtab %}

{% tab title="Mac OS" %}

```objectivec
/**
* @return SDKVersion
*/
[DevToDev sdkVersion];
```

{% endtab %}

{% tab title="Adobe Air" %}

```javascript
/**
* @return SDKVersion
*/
DevToDev.getSdkVersion();
```

{% endtab %}

{% tab title="UE4" %}

{% endtab %}
{% endtabs %}

## Set app version

{% tabs %}
{% tab title="iOS" %}

{% endtab %}

{% tab title="Android" %}

{% endtab %}

{% tab title="Windows 8.1 and 10" %}

{% endtab %}

{% tab title="Web" %}

{% endtab %}

{% tab title="Unity" %}
To set set current application version in WEB and Windows Standalone apps use this property:

```csharp
/// <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;
```

{% endtab %}

{% tab title="Mac OS" %}

{% endtab %}

{% tab title="Adobe Air" %}

{% endtab %}

{% tab title="UE4" %}

{% endtab %}
{% endtabs %}

## 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.

{% tabs %}
{% tab title="iOS" %}
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.

```objectivec
/**
* The method of limiting the processing of user data. The right to be forgotten.
* @param BOOL trackingAvailable - use 'false' to erase user's personal data and stop collecting data of this user.
* 'true' if you want to resume data collection.
*/
[DevToDev setTrackingAvailability: (BOOL) trackingAvailable];
```

{% endtab %}

{% tab title="Android" %}
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.

```java
/**
* The method of limiting the processing of user data. The right to be forgotten.
* @param 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.
*/
DevToDev.setTrackingAvailability(boolean isAvailable);
```

{% endtab %}

{% tab title="Windows 8.1 and 10" %}
In the case of using TrackingAvailability property 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.

In the case of using TrackingAvailability property with a ‘true’ value, the permission to block data collection is removed.

```csharp
/// <summary> 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.SDK.TrackingAvailability = false/true;
```

{% endtab %}

{% tab title="Web" %}
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.

```javascript
/**
* 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);
```

{% endtab %}

{% tab title="Unity" %}
In the case of using TrackingAvailability property 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.

In the case of using TrackingAvailability property with a ‘true’ value, the permission to block data collection is removed.

```csharp
/**
* 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;
```

{% endtab %}

{% tab title="Mac OS" %}
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.

```objectivec
/**
* The method of limiting the processing of user data. The right to be forgotten.
* @param BOOL trackingAvailable - use 'false' to erase user's personal data and stop collecting data of this user.
* 'true' if you want to resume data collection.
*/
[DevToDev setTrackingAvailability: (BOOL) trackingAvailable];
```

{% endtab %}

{% tab title="Adobe Air" %}
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.

```javascript
/**
* The method of limiting the processing of user data. The right to be forgotten.
* @param isTrackingAvailable - 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(isTrackingAvailable:Boolean)
```

{% endtab %}

{% tab title="UE4" %}

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devtodev.com/integration/integration-of-sdk/analytics-intergation/secondary-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
