LogoLogo
My AppsLive demoNewsArticles
  • Introduction
  • 📌Product updates: 2025
    • 2024
    • 2023
  • Getting Started
    • Registration
    • Adding a space
    • Adding an app to the space
  • Basic Events & Custom Events
  • Integration
    • Expert Tips
      • What to track
      • Payments & Anti-cheat
      • Check your integration
    • Integration of SDK 2.0+
      • SDK Integration
        • Android
        • iOS
        • macOS
        • Windows
        • Web
          • Web SDK Integration
          • Web SDK Releases
        • Unity
        • Unreal Engine
        • Godot Engine
      • Automatic payment tracking
        • App Store
        • Google Play
      • Setting up Events
        • Basic methods
        • Secondary methods
        • User profile
        • Anticheat methods
        • Track sessions
      • Push notifications
        • Android
        • iOS
        • Windows (UWP)
        • Unity
          • Android
          • iOS
          • Windows (UWP/WSA)
        • Unreal Engine
      • A/B testing
        • Description of A/B testing on the SDK side
        • Working with A/B tests in the devtodev interface
        • A/B testing examples
    • Integration of SDK 1.0+ (deprecated)
      • SDK Integration
        • iOS
        • Android
        • Windows 8.1 and 10
        • Web
        • Unity
        • Mac OS
        • Adobe Air
        • UE4
      • Setting up Events
        • Basic methods
        • Secondary methods
        • User profile
        • Anti-cheat Methods
      • Push Notifications
        • IOS
        • Android
        • Windows 8.1 and Windows 10
        • Unity
        • Abode Air
        • UE4
    • Test Devices
    • Server API
      • Data API 2.0
      • Subscription API
      • Push API
        • IOS
        • Android
        • Windows UWP
        • Windows
      • Raw Export
      • Labels API
      • Data API
    • Import historical data via API
    • Data Export
      • Data Export to Cloud Storage (BigQuery / Amazon S3)
  • 3rd Party Sources
    • Attribution Trackers
      • AppsFlyer
      • Adjust
      • Branch.io
      • Kochava
      • Tenjin
      • Tune (MAT)
      • Singular
      • Custom postback API
      • Facebook Ads referral decryption
    • App Marketplace Data
      • App Store Connect Stats
      • App Store Subscriptions
      • Google Play Console Stats
      • Google Play Subscriptions
      • AppGallery Connect Stats
    • Ad revenue
      • AdColony
      • AdMob
      • Facebook
      • MoPub
      • Unity Ads
      • Vungle
      • Ad revenue API
    • Cohort export
  • Reports and Functionality
    • Space-related Reports and Functionality
      • Overview
      • Custom dashboards & Reports
      • SQL
        • SQL tips
        • SQL Query examples
      • Audience overlap
    • Project-related Reports and Functionality
      • Overview
        • Real-Time Dashboard
        • Acquisition reports
        • Engagement reports
        • Monetization reports
        • In-game analysis reports
        • Cohort analysis
      • Reports
      • Push Notifications
        • Android Notifications
        • IOS Notifications
        • Windows Notifications
        • Button Templates
      • Predictions
      • Users & Segments
      • Filters
      • A/B Testing
      • Tuning
      • Settings
  • Metrics and Glossary
    • Ad networks metrics
    • Market Metrics
    • Prediction Metrics
    • SDK Metrics
    • Subscription metrics
  • Space Management
  • User Profile Management
  • Limits
  • Scenarios and Best Practices
    • Analytics use cases
    • Match-3
    • MMORPG Games
    • Hyper-Casual games
    • Social Casino
    • RPG games
    • Farming games
    • Non-gaming app
  • FAQ
    • Identification
    • Raw Data
    • All about data discrepancies
  • Slack
Powered by GitBook
On this page
  • Ad impression
  • Connecting to social networks
  • Posting to social networks
  • Referrer
  • Force dispatch of accumulated events
  • Setters & Getters
  • Setting User Tracking Status (GDPR)
  • Getting device ID
  • Getting the devtodev SDK version
  • Obtaining user tracking status (GDPR)
  • Getting devtodev ID

Was this helpful?

Export as PDF
  1. On the go
  2. Integration of SDK v2.0+
  3. Setting up events

Secondary methods

Ad impression

The event is used for individual tracking of ad revenue on user devices. The method is used if there are CPI data available on the client device (they can be obtained from the ad network SDK).

Do not apply this method if you use ad networks that utilize the server-server protocol for sending ad revenue data (ironSource, AppLovin MAX, and Fyber networks) and you already set up this method of data collection because if you use both data sources, your revenue data may be duplicated.

Parameter
Type
Restrictions
Description

network

String

from 1 to 100 symbols

Name of the ad network responsible for the impression

revenue

Double

from 0,0 to Double.max

Reward for banner display in USD

placement

String?

from 1 to 100 symbols, optional

Banner placement

unit

String?

from 1 to 100 symbols, optional

Banner name

DTDAnalytics.adImpression(network: "Network name",
                          revenue: 0.15,
                          placement: "Placement of the banner",
                          unit: "Banner title")
Parameter
Type
Restrictions
Description

network

String

from 1 to 100 symbols

Name of the ad network responsible for the impression

revenue

Double

from 0,0 to Double.max

Reward for banner display in USD

placement

String?

from 1 to 100 symbols, optional

Banner placement

unit

String?

from 1 to 100 symbols, optional

Banner name

[DTDAnalytics adImpressionWithNetwork:@"Network name"
                              revenue:0.15f
                            placement:@"Placement of the banner"
                                unit:@"Banner title"];
Parameter
Type
Restrictions
Description

network

String

from 1 to 100 symbols

Name of the ad network responsible for the impression

revenue

Double

from 0,0 to Double.max

Reward for banner display in USD

placement

String?

from 1 to 100 symbols, optional

Banner placement

unit

String?

from 1 to 100 symbols, optional

Banner name

DTDAnalytics.adImpression(network: "Network name",
                          revenue: 0.15,
                          placement: "Placement of the banner",
                          unit: "Banner title")
Parameter
Type
Restrictions
Description

network

String

from 1 to 100 symbols

Name of the ad network responsible for the impression

revenue

Double

from 0,0 to Double.max

Reward for banner display in USD

placement

String?

from 1 to 100 symbols, optional

Banner placement

unit

String?

from 1 to 100 symbols, optional

Banner name

var network = "Network name";
var revenue = 0.15;
var placement = "Placement of the banner";
var unit = "Banner title";
DTDAnalytics.AdImpression(network, revenue, source, placement, unit);
Parameter
Type
Restrictions
Description

network

String

from 1 to 100 symbols

Name of the ad network responsible for the impression

revenue

Double

from 0,0 to Double.max

Reward for banner display in USD

placement

String?

from 1 to 100 symbols, optional

Banner placement

unit

String?

from 1 to 100 symbols, optional

Banner name

var network = "Network name";
var revenue = 0.15;
var placement = "Placement of the banner";
var unit = "Banner title";
DTDAnalytics.AdImpression(network, revenue, source, placement, unit);

Parameter

Type

Restrictions

Description

socialNetwork

FString

from 1 to 100 symbols

The name of the ad network that delivered the impression.

revenue

float

form 0.0 to float.MaxValue

Reward for displaying a banner in USD.

placement

FString

from 1 to 100 symbols

Placement of the banner.

unit

FString

from 1 to 100 symbols

Banner title.

UDTDAnalyticsBPLibrary::AdImpression("NetworkName", 0.36, "BannerPlacement", "BannerTitle");

Connecting to social networks

The event is used to track connections to social media channels.

Use the following constants to specify a social network:

.facebook, .vkontakte , .twitter, .googleplus, .whatsapp, .viber, .evernote, .googlemail, .linkedin, .pinterest, .qzone, .reddit, .renren, .tumblr

Or create an object with the desired social media name.

let network = DTDSocialNetwork(name: "NetworkName")
DTDAnalytics.socialNetworkConnect(socialNetwork: network)

Use the following constants to specify a social network:

.facebook, .vkontakte , .twitter, .googleplus, .whatsapp, .viber, .evernote, .googlemail, .linkedin, .pinterest, .qzone, .reddit, .renren, .tumblr

Or create an object with the desired social media name.

DTDSocialNetwork *network = [[DTDSocialNetwork alloc] initWithName:@"NetworkName"];
[DTDAnalytics socialNetworkConnect:network];

Use the following constants to specify a social network:

DTDSocialNetwork.facebook, DTDSocialNetwork.vkontakte , DTDSocialNetwork.twitter, DTDSocialNetwork.googleplus, DTDSocialNetwork.whatsapp, DTDSocialNetwork.viber, DTDSocialNetwork.evernote, DTDSocialNetwork.googlemail, DTDSocialNetwork.linkedin, DTDSocialNetwork.pinterest, DTDSocialNetwork.qzone, DTDSocialNetwork.reddit, DTDSocialNetwork.renren, DTDSocialNetwork.tumblr

Or create an object with the desired social media name.

let network = DTDSocialNetwork(name: "NetworkName")
DTDAnalytics.socialNetworkConnect(socialNetwork: network)

Use the following constants to specify a social network:

DTDSocialNetwork.facebook, DTDSocialNetwork.vkontakte , DTDSocialNetwork.twitter, DTDSocialNetwork.googleplus, DTDSocialNetwork.whatsapp, DTDSocialNetwork.viber, DTDSocialNetwork.evernote, DTDSocialNetwork.googlemail, DTDSocialNetwork.linkedin, DTDSocialNetwork.pinterest, DTDSocialNetwork.qzone, DTDSocialNetwork.reddit, DTDSocialNetwork.renren, DTDSocialNetwork.tumblr

Or create an object with the desired social media name:

var network = new DTDSocialNetwork(name: "NetworkName");
DTDAnalytics.SocialNetworkConnect(socialNetwork: network);

Use the following constants to specify a social network:

DTDSocialNetwork.facebook, DTDSocialNetwork.vkontakte , DTDSocialNetwork.twitter, DTDSocialNetwork.googleplus, DTDSocialNetwork.whatsapp, DTDSocialNetwork.viber, DTDSocialNetwork.evernote, DTDSocialNetwork.googlemail, DTDSocialNetwork.linkedin, DTDSocialNetwork.pinterest, DTDSocialNetwork.qzone, DTDSocialNetwork.reddit, DTDSocialNetwork.renren, DTDSocialNetwork.tumblr

Or create an object with the desired social media name:

var network = new DTDSocialNetwork(name: "NetworkName");
DTDAnalytics.SocialNetworkConnect(socialNetwork: network);
window.devtodev.socialNetworkConnect('NetworkName')

Argument

Type

Description

socialNetwork

EDTDSocialNetwork

Predefined social network.

UDTDAnalyticsBPLibrary::SocialNetworkConnect(EDTDSocialNetwork::Linkedin);

Or use special method for custom social network:

UDTDAnalyticsBPLibrary::SocialNetworkConnectCustom("SocialNetworkName");

Argument

Type

Description

socialNetwork

FString

Custom social network.

Posting to social networks

Track social media posts and analyze their effectiveness and virality. Pass the event after the post has been approved by social media.

DTDAnalytics.socialNetworkPost(socialNetwork: .facebook, 
                                      reason: "New level reached")
[DTDAnalytics socialNetworkPost:DTDSocialNetwork.facebook withReason:@"New level reached"];
DTDAnalytics.socialNetworkPost(socialNetwork: DTDSocialNetwork.facebook,
                                      reason: "New level reached")
DTDAnalytics.SocialNetworkPost(
    socialNetwork: DTDSocialNetwork.facebook,
    reason: "New level reached");
DTDAnalytics.SocialNetworkPost(
    socialNetwork: DTDSocialNetwork.Facebook,
    reason: "New level reached");
window.devtodev.socialNetworkPost("NetworkName", "New level reached")

Argument

Type

Description

socialNetwork

EDTDSocialNetwork

Predefined social network.

UDTDAnalyticsBPLibrary::SocialNetworkPost(EDTDSocialNetwork::Linkedin, "PostReason");

Argument

Type

Description

socialNetwork

FString

Custom social network.

UDTDAnalyticsBPLibrary::SocialNetworkPostCustom("SocialNetworkName", "PostReason");

Referrer

If you have referral information, you can pass it using the following method:

let referrerData = [DTDReferralProperty.source: "AdWords",
                    DTDReferralProperty.medium: "CPI",
                    DTDReferralProperty.content: "Snow Boots",
                    DTDReferralProperty.campaign: "Warm Snow Boots",
                    DTDReferralProperty.term: "shoes+boots"]
                    
DTDAnalytics.referrer(utmData: referrerData)
NSDictionary <DTDReferralProperty *, NSString *> * referrerData = @{
  DTDReferralProperty.source: @"AdWords",
  DTDReferralProperty.medium: @"CPI",
  DTDReferralProperty.content: @"Snow Boots",
  DTDReferralProperty.campaign: @"Warm Snow Boots",
  DTDReferralProperty.term: @"shoes+boots",
};
[DTDAnalytics referrer:referrerData];
enum class DTDReferralProperty {
    Source,
    Campaign,
    Content,
    Medium,
    Term;
}
val referrer = mutableMapOf(
                DTDReferralProperty.Medium to "some value",
                DTDReferralProperty.Campaign to "some value"
               )
                    
DTDAnalytics.referrer(utmData: referrer)
var referrer = new Dictionary<DTDReferralProperty, string>
{
    [DTDReferralProperty.Medium] = "some value",
    [DTDReferralProperty.Campaign] = "some value"
};
DTDAnalytics.Referrer(referrer: referrer);
var referrer = new Dictionary<DTDReferralProperty, string>
{
    [DTDReferralProperty.Medium] = "some value",
    [DTDReferralProperty.Campaign] = "some value"
};
DTDAnalytics.Referrer(referrer: referrer);
var referrer = {
    source: "some source",
    term: "some term",
    medium: "some medium",
    source: "some source",
    content: "some content",
    campaign: "some campaign",
};
window.devtodev.referrer(referrer)

Argument

Type

Description

utmData

TMap<EDTDReferralProperty, FString>

UTM data.

TMap<EDTDReferralProperty, FString> referrer;
referrer.Add(EDTDReferralProperty::Source, "Source");
referrer.Add(EDTDReferralProperty::Medium, "Medium ");
referrer.Add(EDTDReferralProperty::Content, "Content ");
referrer.Add(EDTDReferralProperty::Campaign, "Campaign ");
referrer.Add(EDTDReferralProperty::Term, "Term ");
UDTDAnalyticsBPLibrary::Referrer(referrer);

Force dispatch of accumulated events

To send an event packet before it is full (10 events, by default) or before the end of the period of its formation (2 minutes, by default), you can use immediate dispatch.

We don’t recommend using this method unless absolutely necessary! When the Real payment event is created, the forced dispatch of the packet occurs automatically.

DTDAnalytics.sendBufferedEvents()
[DTDAnalytics sendBufferedEvents];
DTDAnalytics.sendBufferedEvents()
DTDAnalytics.SendBufferedEvents();
DTDAnalytics.SendBufferedEvents();
window.devtodev.sendBufferedEvents()
UDTDAnalyticsBPLibrary::SendBufferedEvents();

Setters & Getters

When working with getters you should take into account that the new devtodev SDK is completely asynchronous. The execution result must be processed within the completionHandler.

All set and get methods need to be called only after the initialization of the SDK.

It is also worth remembering that the SDK will call the callback in background queues, so we recommend that you transfer the processing of return values to the queue you need.

For example:

DispatchQueue.main.async{}
dispatch_async(dispatch_get_main_queue(), ^{ });
Handler(Looper.getMainLooper()).post{}
var result = await DTDAnalytics.GetUserId();
DTDAnalytics.GetUserId( id => {
  //your code
});

Argument

Type

Description

onResult

  • FAnalyticsDynamicGetterStringDelegate

  • FDTDGetterStringDelegate

Callback.

auto onResult = new FDTDGetterStringDelegate();
onResult->BindLambda([](const FString& value)
{
	// Your code...
});
UDTDAnalyticsBPLibrary::GetUserId(*onResult);

Setting User Tracking Status (GDPR)

This method denies/allows tracking of user data and also implements the right to be forgotten in accordance with the requirements of the GDPR.

When this method is called with the 'false' value, the SDK sends a command to the server to delete all personal user data that was collected by devtodev in this application, blocking further user data collection.

The user will remain in the devtodev system only as an impersonal unit in the previously aggregated metrics.

If it is set to ‘true', tracking can be enabled again. In this case, the user will be considered new.

To enable/disable user tracking by the devtodev system. Bool type.

DTDAnalytics.setTrackingAvailability(value: true)
[DTDAnalytics trackingAvailability:true];
DTDAnalytics.setTrackingAvailability(value: true)
DTDAnalytics.SetTrackingAvailability(trackingValue: true);
DTDAnalytics.SetTrackingAvailability(trackingValue: true);
window.devtodev.setTrackingAvailability(true)
UDTDAnalyticsBPLibrary::SetTrackingAvailability(true);

Getting device ID

Get device ID. String type.

DTDAnalytics.getDeviceId { deviceId in
  // your code
}
[DTDAnalytics deviceIdHandler:^(NSString * _Nonnull deviceId) {
  // your code
}];
DTDAnalytics.getDeviceId { deviceId ->
  // your code
}
var devideId = await DTDAnalytics.GetDeviceId();
DTDAnalytics.GetDeviceId( id => {
  //your code
});
var devideId = window.devtodev.getDeviceId()

Argument

Type

Description

onResult

  • FAnalyticsDynamicGetterStringDelegate

  • FDTDGetterStringDelegate

Callback.

auto onResult = new FDTDGetterStringDelegate();
onResult->BindLambda([](const FString& value)
{
	// Your code...
});
UDTDAnalyticsBPLibrary::GetDeviceId(*onResult);

Getting the devtodev SDK version

Get the version of the integrated devtodev SDK. String type.

DTDAnalytics.getSDKVersion { sdkVersion in
  // your code
}
[DTDAnalytics sdkVersionHandler:^(NSString * _Nonnull sdkVersion) {
  // your code
}];
DTDAnalytics.getSDKVersion { sdkVersion ->
  // your code
}
var sdkVersion = DTDAnalytics.GetSdkVersion();
DTDAnalytics.GetSdkVersion( version => {
  //your code
});
var sdkVersion = window.devtodev.getSDKVersion()

Argument

Type

Description

onResult

  • FAnalyticsDynamicGetterStringDelegate

  • FDTDGetterStringDelegate

Callback.

// Some codecauto onResult = new FDTDGetterStringDelegate();
onResult->BindLambda([](const FString& value)
{
	// Your code...
});
UDTDAnalyticsBPLibrary::GetSdkVersion(*onResult);

Obtaining user tracking status (GDPR)

Retrieving the saved state of the user tracking permission by the devtodev system. See “Setting User Tracking Status”. Bool type.

DTDAnalytics.getTrackingAvailability { trackingAvailability in
  // your code
}
[DTDAnalytics trackingAvailabilityHandler:^(BOOL trackingAvailability) {
  // your code
}];
DTDAnalytics.getTrackingAvailability { trackingAvailability ->
  // your code
}
var trackingAvailability = await DTDAnalytics.GetTrackingAvailability();
DTDAnalytics.GetTrackingAvailability( tracking => {
  //your code
});
var trackingAvailability = window.devtodev.getTrackingAvailability()

Argument

Type

Description

onResult

  • FAnalyticsDynamicGetterBoolDelegate

  • FDTDGetterBoolDelegate

Callback.

auto onResult = new FDTDGetterBoolDelegate();
onResult->BindLambda([](bool value)
{
	// Your code...
});
UDTDAnalyticsBPLibrary::GetTrackingAvailability(*onResult);

Getting devtodev ID

devtodev ID is the primary numeric identifier for the device/user account in the devtodev database. Using devtodev ID, you are sure to find the user in devtodev.

The identifier will be received from the server some time after the initialization of the SDK.

If you have set counting by users, a separate devtodev id will be issued for each device user.

To obtain the devtodev ID, you need to pass the listener to DTDAnalytics:

DTDAnalytics.setIdentifiersListener(listener: self)

The delegate must implement the func didReceiveDevtodevId(with devtodevId: Int)

func didReceiveDevtodevId(with devtodevId: Int) {
  /// your code
}

The didReceiveDevtodevId method will be called with every ID change on the server side.

To obtain the devtodev ID, you need to pass the listener to DTDAnalytics:

@interface Controller ()  <DTDIdentifiersListener>
[DTDAnalytics setIdentifiersListenerWithListener:self];

The delegate must implement the (void)didReceiveDevtodevIdWith:(NSInteger)devtodevId;

- (void)didReceiveDevtodevIdWith:(NSInteger)devtodevId {
  // your code
}

The didReceiveDevtodevId method will be called with every ID change on the server side.

To obtain the devtodev ID, you need to pass the DTDIdentifiersListener listener to DTDAnalytics:

DTDAnalytics.setIdentifiersListener(object : DTDIdentifiersListener {
            override fun didReceiveDevtodevId(devtodevId: Long) {
               /// your code
            }
        })

The didReceiveDevtodevId method will be called with every ID change on the server side.

To obtain the devtodev ID, you need to pass the DTDIdentifiersListener listener delegate to DTDAnalytics:

DTDAnalytics.SetIdentifiersListener(devtodevId =>
{
    // Your code...
});

The delegate method will be called with every ID change on the server side.

To obtain the devtodev ID, you need to pass the DTDIdentifiersListener listener delegate to DTDAnalytics:

DTDAnalytics.SetIdentifiersListener(devtodevId =>
{
    // Your code...
});

The delegate method will be called with every ID change on the server side.

window.devtodev.setIdentifiersListener((devtodevId) =>
{
// Your code...
})

Argument

Type

Description

listener

  • FAnalyticsDynamicGetterLongDelegate

  • FDTDGetterLongDelegate

devtodev ID Listener.

auto listener = new FDTDGetterLongDelegate();
listener->BindLambda([](int64 value)
{
	// Your code...
});
UDTDAnalyticsBPLibrary::SetIdentifiersListener(*listener);

Last updated 3 years ago

Was this helpful?

Blueprint
Blueprint
Blueprint
Blueprint
Blueprint
Blueprint
Blueprint
Blueprint
Blueprint
Blueprint
Blueprint
Blueprint
Blueprint