Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Endpoint:
Query type: POST
The query body is a JSON object with fields described in the table below.
If the notification is accepted, the response status is 200. If the query is incorrect, the response status is 400. In case of an internal error, the response status is 500.
In case the status is 400 or 500, the error description will be indicated in the query body as a JSON object:
Available notification types for a trial (all postbacks should be flagged as ‘isTrial
= true’):
purchase - trial subscription
cancellation - subscription cancellation before the end of that trial
2. Available notification types for subscription purchase:
purchase - subscription purchase
renewal - subscription renewal
cancellation - premature termination of a subscription and proportional refund
refund - money refund
devtodev Push API supports two different formats of notification sending to Windows operational systems:
UWP format described in this section can be used only for Windows 10 and Windows Phone 10. It is described by the "uwp" object.
works on a basis of Legacy tiles and toast schema. It can be used for Windows Phone 8.1, Windows Phone 10, Windows 8.1, Windows 10. It is described by the "windows" object.
Use this object (“uwp”) if your clients are users of OS Windows 10 and Windows Phone 10 only. With the help of this method it is possible to realize more opportunities offered by Windows 10.
In order to find an addressee to whom you need to send a notification, it is possible to specify one or several available identifiers:
Object "uwp" can contain 2 properties:
The property that describes a message can be represented by one of 4 possible objects: - toast (object) - the result of sending is the delivery of toast-notification - raw (object) - sends a hidden toast-notification - tile (object) - changes the tile content of an app - badge (object) - changes the value of a badge field displayed on a tile
The property that describes additional parameters of a message is represented by the object “options”. Optional.
Example
In UWP format every of tile’s size must be described separately, therefore, the object “tile” can contain up to 4 properties:
small
medium
wide
large (only for desktop)
Each of these sizes is described by an object with the following properties:
Example
Example
Example
To use Push API you need to have individual User API token, which can be found in the settings of space.
You’ll see the block with User API token on the space settings page only in case if your tariff plan and access rights allow to use devtodev API. You can reset User API token or create it again on the same page.
Please attend, if you use several spaces, in every space user has individual User API token.
The request of assignment should be sent to:
Where
user_token - individual User API token of a user. It could be sent with both GET and POST methods.
v1 - the current version of API
Request content is sent with POST method in JSON format.
The body of a request can contain the following properties:
An example of a request for sending a simple notification to an iOS device:
POST
If a request is formed correctly and there are no obstacles for sending a notification to users, an answer is JSON of the following type:
where
audience (number) - the number of users found
successful (number) - the number of successfully sent notifications
erroneous (number) - the number of notifications rejected by the delivery service
error_details (array) - a detailed description of reasons of a delivery fail
In case there is an error in a request, an answer is made in the following format:
where
status_code (number) - a general status of an error
errors (array) - an array of error descriptions
code (number) - the exact code of an error from the table of errors
msg (string) - a brief description of an error
The list of possible errors is given in a table.
Besides the errors listed above, error_details field may contain errors from the connected notification services. You can find descriptions of such errors in documentation for these services:
List of all devtodev APIs
Below you can find APIs for 3rd party services. You can use them in case devtodev does not provide an integration to a specific 3rd party service.
Check the list of available services for Ad Revenue .
Check the list of available Attribution trackers .
In order to find a user to whom you need to send a notification, it is possible specify one or several available identifiers:
The object of a message for the iOS platform contains 2 fields:
payload (object) - describes the main content of a notification
options (object) - describes the optional settings of notification delivery
The text on the buttons, which are on the list of templates, is translated into N languages and displayed to users individually according to the location of a device.
POST
POST
Name
Description
notificationType
Type of notification
originalTransactionId
ID of the original transaction
transactionId
Transaction ID
startDateMs
Subscription start date in milliseconds in UTC
expiresDateMs
Subscription expiration date in milliseconds in UTC
product
Subscription SKU
productType
Subscription type (line)
price
Subscription price
currency
Currency of the subscription payment
isTrial
The event is flagged if it’s trial ana d isn’t flagged if it’s a subscription
gracePeriod
Extension of subscription renewal date in days. If this field is filled in and the user didn’t renew the subscription before the expiration date, then wait for gracePeriod days to flag it as expired
Fields for user identification (Attention! Regardless of the type of notification, at least one of the user IDs must be specified in the query)
idfa
Available platforms: iOS
idfv
Available platforms: iOS
advertisingId
Available platforms: Android, Windows
androidId
Available platforms: Android
userId
The same as Main ID in user card
customId
String custom user ID
Available platforms: all platforms
devtodevId
d2d numeric user idAvailable platforms: all platforms
Notification types
Description
purchase
First-time subscription purchase
renewal
Active subscription renewal
refund
Money refund
cancellation
Cancellation of an active subscription and proportional refund
Field name
Description
notificationType
Notification type = purchase
originalTransactionId
ID of the original transaction
transactionId
Transaction ID
startDateMs
Trial start date in milliseconds in UTC
expiresDateMs
Trial expiration date in milliseconds in UTC
product
Subscription SKU
productType
Subscription type (line)
isTrial
true
Field name
Description
notificationType
Notification type = cancellation
originalTransactionId
ID of the original transaction
transactionId
Transaction ID
expiresDateMs
Trial expiration date in milliseconds in UTC
product
Subscription SKU
productType
Subscription type (line)
isTrial
true
Field name
Description
notificationType
Notification type = purchase
originalTransactionId
ID of the original transaction
transactionId
Transaction ID
startDateMs
Subscription start date in milliseconds in UTC
expiresDateMs
Subscription expiration date in milliseconds in UTC
product
Subscription SKU
productType
Subscription type (line)
isTrial
false
price
Subscription price
currency
Currency of the subscription payment
gracePeriod
Extension of subscription renewal date in days
Field name
Description
notificationType
Notification type = renewal
originalTransactionId
ID of the original transaction
transactionId
Transaction ID
startDateMs
Subscription start date in milliseconds in UTC
expiresDateMs
Subscription expiration date in milliseconds in UTC
product
Subscription SKU
productType
Subscription type (line)
isTrial
false
price
Subscription price
currency
Currency of the subscription payment
gracePeriod
Extension of subscription renewal date in days
Field name
Description
notificationType
Notification type = cancellation
originalTransactionId
ID of the original transaction
transactionId
Transaction ID
expiresDateMs
Subscription expiration date in milliseconds in UTC
product
Subscription SKU
productType
Subscription type (line)
isTrial
false
Field name
Description
notificationType
Notification type = refund
originalTransactionId
ID of the original transaction
transactionId
Transaction ID
expiresDateMs
Subscription expiration date in milliseconds in UTC
product
Subscription SKU
productType
Subscription type (line)
isTrial
false
price
The amount of money refunded to the user
currency
Currency of the subscription payment
Property | Type | Description |
scenario | string | Optional. Available values: "default", "alarm", "reminder", "incomingCall". Default value is "default". You do not need this unless your scenario is to pop an alarm, reminder, or incoming call. Do not use this just for keeping your notification persistent on screen. |
title | string | Required. A short string describing the purpose of a notification. |
text | string | Required. Main text of a notification. |
text2 | string | Optional. Additional text of a notification. |
data | object | Optional if notification is not hidden. You can pass custom parameters with messages and use them within an app. For instance, you can activate advertising campaign or any other functionality for user who has received this message. Example:
|
icon | string | Optional. To replace the application icon (that shows up on the top left corner of the toast) use the URL or the resource name. In Windows 10 the image is expressed using the URI of the image source, using one of these protocol handlers:
|
image | string | Optional. Image inside the toast body, below the text. Use the URL or the resource name. |
sound | string | Optional. The media file to play in place of the default sound. If the option is not used, the notification comes silently. This property can have one of the following string values:
On mobile platform this property can also contain the path to a local audio file with one of the following prefixes:
|
action | object | Optional. Action after a click on the body of a notification. By default, a click simply opens an app. It is also possible to perform the following actions:
Examples:
|
interactive | object | Optional. It is possible to specify an array of notification buttons in the “interactive” object. Each button must contain the following properties:
Example:
|
Property | Type | Description |
content | array | As long as tile’s content is dynamic, it is described by an array, the elements of which can be objects describing either text strings or illustrations. Text element object properties:
Image element object properties
Group element object properties
Subgroup element object (used inside groups only)
|
branding | object | You can control the branding on the bottom of a live tile (the display name and corner logo) by using this property. Branding object properties:
|
v_align | string | You can control the vertical alignment of content on your tile by using this property. By default, everything is vertically aligned to the "top", but you can also align content to the "bottom" or "center". |
overlay | number | Optional. You can set a black overlay on your background image using this property, which accepts integers from 0-100 with 0 being no overlay and 100 being full black overlay. If you don't specify an overlay, the background image opacity defaults to 20% and the peek image opacity defaults to 0%. |
Property | Type | Description |
data | object | Required. You can pass custom parameters with messages and use them within an app. For instance, you can activate advertising campaign or any other functionality for user who has received this message. Example:
|
badge | string | Optional. A number from 1 to 99. A value of 0 is equivalent to the glyph value "none" and will clear a badge. Instead of a number, a badge can display one of a non-extensible set of status glyphs:
It is also possible to send values incrementing or decrementing the current value in a “+2”, “-1” format. In case the previous value was the glyph or 0, the value will be increment. Decrement does not influence the zero value and the glyph. |
Property | Type | Description |
badge | string | A number from 1 to 99. A value of 0 is equivalent to the glyph value "none" and will clear a badge. Instead of a number a badge can display one of a non-extensible set of status glyphs:
|
Status code | Code | Value of "msg" field | Error description |
500 | 1 | Unknown Error | Unknown error. Please contact devtodev technical support. |
400 | 2 | Request body is empty | The empty body of the request. There is no POST data in the request. |
400 | 3 | Malformed json | JSON error in the body of the request. Fix the formatting error. |
400 | 4 | Field not found: %field_name% | An obligatory field can not be found. You need to complete the request with this field. |
400 | 6 | Invalid app id %app id value% | The requested project can not be found. An unknown application. This error can arise when a user makes a mistake with an app ID or when an application with this ID has been removed. |
401 | 11 | Authorization error. Wrong user token %user_token value% | Authorization error. The set token is wrong. “User_token” field. User API token. |
401 | 12 | Authorization error. User_token is not set. | Authorization error. “User_token” field is absent. User API token should be set either as a parameter in GET string of the request or in POST body of the request. |
403 | 13 | Access denied. You have no access to the app %app id value% | The error of access. User has no access to this application. |
403 | 14 | Access denied. You have no access to the report file %file id value% | The error of access. User has no access to this file. This error can arise if you have to access the application used in a previously created request. |
403 | 15 | Access denied. You have no access to API. | The error of access. No access to User API token. This error can arise when access rights have been changed (as a consequence of changing a user role or tariff plan) |
403 | 23 | Access denied. You have no access to Push API. | The error of access. This error can arise when you have no rights to Push API for your user role or tariff plan. |
400 | 24 | Push service is not enabled in an application settings. | Push service is disabled. Enable the service on the settings page of an app. |
400 | 25 | The devtodev SDK is not integrated with the application you specified | The SDK is not integrated |
400 | 26 | No push token has been received from the devtodev SDK integrated with the app you specified. Please make sure the SDK is integrated correctly. | No push token has been received from the devtodev SDK integrated with the app you specified. Please make sure the SDK is integrated correctly. |
400 | 27 | The audience array should not contain more than 1000 elements. | The audience array contains more than 1000 elements. Reduce the number of users in one request. |
400 | 28 | Unexpected value for field %field%. Received value: %value%. Expected values: %values%. | There is an unexpected value for the field. Use the recommendation and correct the request. |
400 | 29 | Unexpected field %field% | The request contains the field not specified in the documentation. The field must be excluded from the request. |
400 | 30 | Invalid value for field %field%. Received value: %value%. Expected: %description% | Invalid value has been attributed to the field. Use the recommendation and correct the request. |
400 | 31 | Notification payload size limit exceeded. | Reduce the payload size. |
400 | 32 | The sending was blocked. The request with the %pack_id% identifier has already been sent during previous 10 minutes. | Requests with the same identifier can't be repeated during 10 minutes after their sending. |
400 | 33 | The requested users have not been found, or there have been no push-token received from them. | The requested users have not been found, or there have been no push-token received from them. |
Name | Description | Template ID | Button 1 | Button 2 |
Label | id | Label | id |
Yes or No (Open an app) | Yes option takes user into an app. No dismisses the notification. | dtd_yes.open_no.dismiss | Yes | yes | No | no |
Yes or No (Dismiss notification) | Yes and No options dismiss the notification when clicked without taking a user into an app. | dtd_yes.dismiss_no.dismiss | Yes | yes | No | no |
Accept or Decline (Open the app) | Accept option takes a user into an app. No dismisses a notification. | dtd_accept.open_decline.dismiss | Accept | accept | Decline | decline |
Accept or Decline (Dismiss notification) | Yes and No options dismiss a notification when clicked without taking a user into an app. | dtd_accept.dismiss_decline.dismiss | Accept | accept | Decline | decline |
Shop Now | Shop Now takes user into an app. Should be a different location from a notification action. | dtd_shop_now.open | Shop Now | shop_now |
Buy Now | Buy Now takes user into an app. Should be a different location from a notification action. | dtd_buy_now.open | Buy Now | buy_now |
Tell me more | Deep link to more details about a specific offer or program | dtd_more_info.open | Tell me more | more_info |
Download | Download deep links users directly to media e.g. wallpaper images, apps, music downloads, file downloads, etc. | dtd_download.open | Download | download |
Share | Pass sharing text through to native OS apps like Facebook and Twitter using the Share action. | dtd_share.open | Share | share |
Download or Share | Download deep links users directly to media e.g. wallpaper images, apps, music downloads, file downloads, etc. Share the same media socially. | dtd_download.open_share.open | Download | download | Share | share |
Shop Now or Share | Shop Now takes a user into an app; should be a different location from a notification action. | dtd_shop_now.open_share.open | Shop Now | shop_now | Share | share |
Buy Now or Share | Buy Now takes a user into an app; should be a different location from a notification action. | dtd_buy_now.open_share.open | Buy Now | buy_now | Share | share |
Like or Dislike | Both options take a user into an app. | dtd_like.open_dislike.open | Like | like | Dislike | dislike |
Like or Dislike | Like option takes user into an app. Dislike dismisses a notification. | dtd_like.open_dislike.dismiss | Like | like | Dislike | dislike |
Like | Option takes a user into an app. | dtd_like.open | Like | like |
Like and Share | Capture user sentiment by allowing users to like a message or share it. Both options take user into an app. | dtd_like.open_share.open | Like | like | Share | share |
Add | Add an item: most often a wallet pass or card to your digital Wallet. | dtd_add.open | Add | add |
Save and No | Save something for future reference. | dtd_save.open | Save | save |
Rate now | Drive users to rate an app in the app store by deep linking from this button. | dtd_rate.open | Rate now | rate |
Search | Deep link to a search functionality within an app | dtd_search.open | Search | search |
Book now | Deep link to booking flow within an app. | dtd_book.open | Book now | book |
Property | Type | Description |
token | string | Push token. If you use push token, all fields with other identifiers will be ignored! |
advertisingId | string | Advertising ID |
serialId | string | Hardware serial number |
userId | string | User id is applicable if an internal identifier (cross-platform user identifier) is used in your app. |
devtodevId | number | Numeric user identifier in devtodev database. |
Property | Type | Description |
user_token | string | Required. An individual user API token. It can be found on the space settings page. It is possible to send it with both POST and GET methods. |
app_id | string | Required. An application identifier. It can be found in the application’s settings in the Integration section. Required. |
campaign_tag | string | Optional. The name of a campaign. The grouping of statistics for the assessment of the efficiency of a campaign is made by the name of a campaign. The API Stats report can be found in the Push section. |
pack_id | string | Optional. The unique identifier of a request. It is specified by a developer. It is used for the filtering of repeated sendings of identical requests in case of the loss of connection, etc. Requests with the same identifier can't be repeated during 10 minutes after their sending. |
audience | array | Required. An array of mailing audience. The element of an array is an object with an individual for every platform set of user identifiers. It is allowed to specify several known identifiers for one user. The maximum number of elements of an array is 1000. The lists of available identifiers can be found in the description to each platform. |
ios | object |
android | object |
win | object |
uwp | object |
Property | Type | Description |
token | string | Push token. If you use a push token, all fields with other identifiers will be ignored! |
idfa | string | Ad identifier IDFA |
idfv | string | Device identifier under vendor IDFV |
userId | string | User id is applicable if an internal identifier (cross-platform user identifier) is used in your app |
devtodevId | number | Numeric user identifier in devtodev database. |
Property | Type | Description |
title | string | Optional. A short string describing the purpose of a notification. Apple Watch displays this string as a part of the notification interface. This string is displayed only briefly and should be crafted so that it can be understood quickly. This key was added in iOS 8.2. |
text | string | The text of an alert message. Required if a notification is not hidden. |
title-loc-key | string |
title-loc-args | string |
action-loc-key | string |
loc-key | string |
loc-args | array |
launch-image | string | Optional. The filename of an image file in the app bundle, with or without the filename extension. The image is used as a launch image when users tap the action button or move the action slider. If this property is not specified, the system either uses the previous snapshot, uses the image identified by the UILaunchImageFile key in the app’s Info.plist file, or falls back to Default.png. This property was added in iOS 4.0. |
data | object | Optional if notification is not hidden. You can pass custom parameters with messages and use them within an app. For instance, you can activate advertising campaign or any other functionality for the user who has received this message. Example:
|
badge | number | Optional. The number to display as the badge of the app icon. If this property is absent, the badge is not changed. To remove the badge, set the value of this property to 0. |
sound | string |
attachment | object | Optional. Available from devtodev iOS SDK 1.9, Cordova SDK 1.9, Unity SDK 2.3, UE4 SDK 1.9, Air SDK 1.8 Added in iOS 10. The possibility to attach images, videos, audio, and GIFs is available in iOS 10. Specify the type of an attachment ("image", "audio" or "video") and URL that leads to a media file. Attention, iOS uses only “https” protocol. Example:
|
action | object | Optional. Available from devtodev iOS SDK 1.9, Cordova SDK 1.9, Unity SDK 2.3, UE4 SDK 1.9, Air SDK 1.8 The action after a click on the body of a notification. By default, a click simply opens an app. It is also possible to perform the following actions:
Examples:
|
interactive | object | Optional. Available from devtodev iOS SDK 1.9, Cordova SDK 1.9, Unity SDK 2.3, UE4 SDK 1.9, Air SDK 1.8 It is possible to specify one of the existing button templates in an “interactive” object, as well as assign the necessary actions to template buttons. It is possible to assign additional actions only to the button that opens an app. The same set of actions is available: deeplink, url and share. The list of accessible button templates is below in the text. Example:
|
Property | Type | Description |
sandbox | boolean | Default value is false ("Production" gateway). Set to true if you need to send notification through the "Sandbox" gateway (for builds signed with a developer certificate). |
hidden | boolean | Switching a notification to the hidden mode. If “true” - a notification will not be displayed to a user, but will be transferred to an app. Such a message must not contain any properties except “data” in the “payload” object. |
priority | string | Optional. The priority of a notification. Default value is "normal". Specify one of the following values:
|
expire | number | This option identifies the date when the notification is no longer valid and can be discarded. It is possible to use either relative time in seconds passed since the moment of sending, or to specify the exact date in UNIX epoch format date expressed in seconds (UTC). Default value is 7 days (604800 seconds) after sending. If this value is nonzero, APNs stores a notification and tries to deliver it at least once repeating the attempt as needed if it is unable to deliver a notification for the first time. If the value is 0, APNs treats the notification as if it expires immediately and does not store the notification or attempt to redeliver it. |
collapse_key | string | Multiple notifications with the same collapse identifier are displayed to a user as a single notification. The value should not exceed 64 bytes. |
Server API integration manual
This API version is deprecated, please use the latest version.
The request should be sent to:
https://api.devtodev.com/stat/v1/?api=ak-cDNRQl0Lypq4AOUrx8aGGMnmJT1FSebd
where:
api - individual devtodev API app key, which can be found on the page of app integration;
v1 - the current version of the API aggregator.
All the transferred data must be in UTF8 encoding.
Contents must be sent as POST in gzip. The archive must contain JSON with one or more events for one or several users.
The size of a package can't exсeed 1 MB before compression. Packages that exсeed this size can't be processed.
If there are several events they must be formed inside a user object by type (name).
(traffic source, referral) It is used when it is necessary to track data about a source of user appearance. The event is sent when an app is first launched by a user if a user came from a tracked source. Maximum of the fields from the following accessible data must be transferred.
It is not sent in case there is some data missing. The event can't be submitted as a package.
Attention! We strongly recommend that you do not use these properties to transfer and store data that fits the definition of personal data!
The recommended interval of sending is not more than once per 24h.
The recommended interval of sending is not more than once per 24h. Information is the most relevant for mobile devices.
In case it is possible to fix the length of a session, it is sent during the end of a session or during the next session. If there is no such possibility, send the date of the start of a session, the length of a session must be placed in the middle in case it is known. The absence of a parameter of a session's length makes it impossible to count some metrics.
In case you transfer data related to several transactions, group them by item name.
The event allows to learn how a user goes through a tutorial. The event is created after every completed step.
If a tutorial that hasn't been completed is programmed to reset to the beginning, the repeated reference of identical steps will be counted and influence the statistical metrics.
Use the following constants for basic actions:
In all other cases use the number of steps above 0.
If it is necessary to count events that are absent from the main types of events, use user events. An event must have a unique name and can include up to 20 parameters. You can use up to 300 unique names.
We strongly recommend that you do not use custom event properties to transfer and store data that fits the definition of personal data!
This event is for games only.
Allows you to analyze players' distribution by game levels. The event is created when a player moves to the next level. In order to track the average state of game currency accounts, the amount of spendings and earnings of a currency, the amount of a game currency bought while completing a level, you can also send this data in this event.
This event is for games only.
It is used to track the ways in which an in-game currency is spent and the popularity of in-game items.
In case one item is sold in several currencies, a purchase is divided into several events, the amount of which corresponds to the number of currencies. Wherein the number of items is specified only in one event.
This event is for games only.
First of all, the event is used for games with short locations (game levels) that are completed during one game session. The event allows to gather data about the success in location completion and receive statistics by parameters that are changeable during location completion.
The event is used for individual tracking of ad revenue.
Do not use this event 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.
Example:
Allows you to track existing connections to social networks.
Constants that are supported by the system:
Allows you to track publications in social networks. It also allows you to analyze viral channels to optimize marketing efficiency.
It is sent after a publication has been approved by a social network.
We recommend to specify actions that encourage to make a publication as a reason:
The "Wipe" function can help when you test your app and/or when you need to clear user data as a part of the gameplay.
By default, when you send an event without any parameters, a user-specified will be "forgotten". We will keep user data in the database, but you won’t be able to find them by their main identifier. Respectively, the following event batch with the same identifier will result in creating a new user. Also, in certain circumstances, you can’t just ‘forget’ some of the users. Therefore, we have provided several flags that might be helpful.
This event is implemented in accordance with the GDPR requirements.
A developer must use this event in case a user doesn’t want their data to be sent and processed in the devtodev system.
When calling "ts" event with the parameter "isTrackingAllowed": false, it is 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.
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.
'POST' https://api.devtodev.com/stat/v1/?api=ak-npADyEmjxc0usQR52k6it38zUPSloGT7 with gzipped body:
https://www.devtodev.com/upload/files/devtodevapitester.jar
An example of the implementation of a request to PHP with the use of Curl. The sending of real payment.
devtodev RAW export API
To use RAW data export API you need to have an individual User API token, which can be found in the settings of space.
You’ll see the block with User API token on the space settings page only in case if your tariff plan and access rights allow to use devtodev API. You can reset User API token or create it again on the same page.
If some applications of the space are inaccessible to the owner of User API token, then the owner can’t get access to the export of data of these applications. But the access to specific metrics it not extended to the access of raw data.
Please attend, if you use several spaces, in every space user has an individual User API token.
The process of getting data consists of three steps:
job assignment
getting the status of performance
getting the report file by link
Let’s have a look at these steps.
This step is the most important, and its description is the longest one.
The request of assignment should be sent to:
Where
user_token - individual User API token of the user. It could be sent with both GET and POST methods.
v1 - current version of API
The request content is sent with POST method in JSON format.
The body of the request contains the following properties:
Every standard event in devtodev SDK corresponds with two-letters identificator. In case of custom events, the name of the event is the identificator. Also you can use group identificators (start with @).
If you’re interested in the export of custom events according to some specific conditions, you should set the objects with the following properties in the array of the event list:
If you want to export events from a specific audience, you can filter them by the properties of the user card. Only the events that occurred with the filtered users will be included in the exported data.
Caution! Filtering uses the property values of the user card at the time of the data export request.
The names of the properties are the same as the column names in the "users" table of the project, which you can find in the SQL report.
The table shows the fields by which filtering is possible:
The filter can be described with an object, where the following comparison operators can be the properties:
The empty object describes the filter which selects all the events where the parameter value is not null or empty string.
POST
Or another way with event group identificator.
The response in case of successful start execution:
Where
status_code - is the HTTP status code
data - an identificator which is assigned to the job
If you get this response, you can go to the next stage - request of job status (else go to Error handling).
With the job identificator, you can request its current status, using the following request:
The body of request can contain the following properties:
The response to the request of status can be one of the following:
The job is in the queue
The job is in progress
The job is done
Error of job performance
Let’s explore every variant.
To get the report use the link in the URL property.
The report file is zip-archive with files in .CSV format. Every file contains data about one event and/or alias (which was set in the filter in job assignment).
If there are no events according to the query conditions, the response will be the following:
The error can raise either at the moment of job assignment or at the moment of checking the status. The format of response in case of error is the same: In case there is an error, a response is made in the following format:
where
status_code (number) - a general status of an error
errors (array) - an array of error descriptions
code (number) - the exact code of an error from the table of errors
msg (string) - a brief description of an error
The list of possible errors is given in a table.
There are the following limitations to devtodev RAW data export API:
Below you can find the description of each table for events available for export.
This file is always attached to the exported file. The table contains a list of users who performed the exported events. It also contains their characteristics available at the time of the export.
This file contains entries on session starts and user activity times for the selected export period. The table contains session starts (rows with filled session_starts
field) and time when the app was in focus (rows with filled activity_duration field).
This file contains entries on virtual purchases in the app.
A user registration event used in the devtodev database. Usually, the registration date is the same as the date of the first launch of the app.
Event for when the user reaches a certain game level.
Some user properties updates for the selected export period. (devtodev ID, logged IP, os_version).
List of user transactions. Purchases for real currency.
This file contains a list of triggered Progression events.
Social media connection events.
Social media publication events.
Subscription events: buying, renewal, and refund. This file contains only subscription events that impact revenue.
All subscription events.
Tutorial steps events.
This file contains information about changes of user and device identifiers during the selected export period.
This file contains data on user characteristics and devices updates for the selected export period.
This file contains app’s ad impression events. Data from ad networks or the Ad Impression event.
This file contains custom events with {EventName} name.
In order to find a user to whom you need to send a notification, it is possible to specify one or several available identifiers:
The object of a message for the Android platform contains 2 fields:
payload (object) - describes the main content of a notification
options (object) - describes the optional settings of notification delivery
POST
POST
devtodev Push API supports two different formats of notification sending to Windows operational systems:
Universal format described in this section works on the basis of Legacy tiles and toast schema. It can be used on Windows Phone 8.1, Windows Phone 10, Windows 8.1, Windows 10. It is described by the "win" object.
UWP format - can be used only for Windows 10 and Windows Phone 10. It is described by the "uwp" object.
In order to find a user to whom you need to send a notification, you can specify one or several available identifiers:
Object "windows" can contain two properties :
The property that describes a message can be represented by one of 4 possible objects:
toast (object) - the result of sending is the delivery of toast-notification
raw (object) - sends a hidden toast-notification
tile (object) - changes tile content of an app
badge (object) - changes the value of a badge field displayed in a tile of an app
The property that describes additional parameters of a message represented by the object “options”. Optional.
Example
Example
Example
Example
Additional settings of notification delivery and display ("options" object)
In order to be able to use Labels API you must have an individual User API token, which can be found in space settings in devtodev system.
You will be able to see the interface unit with User API token in space settings only in case your price plan and access rights (role) allow you to use devtodev API. You can discard User API token or create it again on the same page.
Pay your attention that if you use several spaces, each of them will have an individual User API token.
The result of the request is the obtaining of the list of all existing labels categories for the app.
Request:
POST
Response:
The request is used to remove or rename a category. The category can be removed only if its full name is specified. One request can remove only one category. In case the parameter move_labels_to_category is specified, labels that belong to the category that is going to be removed will be transfered to the specified category. If the specified category doesn't exist, it will be created. If move_labels_to_category is not specified, all the labels that belong to the category will be removed.
Request:
POST
Response:
The result of the request is the obtaining of the list of labels that are presented as objects.
You can use filters to get some specific labels you need. In case no filter is specified, you will receive the whole list of labels. It is possible to use any combination of fields in a filter.
Request:
POST
Response:
The filter can be described with an object, where the following comparison operators can be the properties:
The empty object describes the filter that selects all the events in which the parameter value is not null or empty string.
In case the specified category doesn't exist, it will be created. If string values of fields exceed the maximum, they will be cut off.
If you need to specify an event without time length, start_date must be equal to end_date or end_date must not be specified.
Request:
POST
Response:
To edit a label you need to specify its identifier (id). All the specified fields for the label will be replaced. In case the specified category doesn't exist, it will be created.
If it is necessary to change the dates of an event, you must specify start_date. It is impossible to specify end_date without specifying start_date. If the label is used in relation to a continuous event (start_data and end_date are different timestamps), but in an edited version only the start_date is received, the label becomes a point that characterizes an instant event.
Request:
POST
Response:
The request is used to delete one or several labels. To delete a label its identifier is required. The request without specified identifiers is not valid.
Request:
POST
Response:
Error handling
In case there is an error in a request, the response is made in the following format:
where
status_code (number) - the general status of an error
errors (array) - an array of error descriptions
code (number) - the exact code of an error from the table of errors
msg (string) - a brief description of an error
The list of possible errors is given in a table.
Not more than 30 labels in one request on labels creation
Not more than 500 labels to be created in a calendar day for User API token
Not more than 200 labels to be created in a calendar day for an app
An object containing a notification and its properties for the
An object containing a notification and its properties for the .
An object containing a notification and its properties for the . Use this object for any version of Windows (Windows Phone 8.1, Windows Phone 10, Windows 8.1, Windows 10).
An object containing a notification and its properties for the 10 / WP 10. Don’t use this object for sending to other versions of Windows.
Optional. The key to a title string in the Localizable.strings file for the current localization. The key string can be formatted with %@ and %n$@ specifiers to take the variables specified in the title-loc-args array. See for more information. This key was added in iOS 8.2.
Optional. Variable string values to appear in place of format specifiers in title-loc-key. See for more information. This key was added in iOS 8.2.
Optional. If a string is specified, the system displays an alert that includes the “Close” and “View” buttons. The string is used as a key to get a localized string in the current localization to use for the right button’s title instead of “View”. See for more information.
Optional. The key to an alert message string in a Localizable.strings file for the current localization (which is set by the user’s language preferences). The key string can be formatted with %@ and %n$@ specifiers to take the variables specified in the loc-args array. See for more information.
Optional. Variable string values to appear in place of format specifiers in loc-key. See for more information.
Optional. The name of a sound file in the app bundle or in the Library/Sounds folder of the app’s data container. The sound in this file is played as an alert. If the sound file doesn’t exist or "default" is specified as the value, the default alert sound is played. The audio must be in one of the audio data formats that are compatible with system sounds; see for details.
Including this key and value means that when your app is launched in the background or resumed, is called
Property | Type | Description |
---|---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Column name | Description |
---|---|
Property
Type
Description
user_token
string
Individual user API token. It can be found on the space settings page. It is possible to send it with both POST and GET methods.
app_id
string
Application identificator. It can be found in the application settings in the Integration section.
start_date
number
Start date of the request interval. Attention! Data is sent in UNIX-time format. Don’t forget to add/subtract the number of correction seconds to get data according to your timezone.
end_date
number
End date of the request interval. Data is sent in UNIX-time format.
events
array
List of events to export. The element of the array can be in the following formats:
Event identificator (string). Have a look at the list of available events and their identificators.
Event group identificator (string). Have a look at the list of available events and their identificators.
Object with the name of custom event where it is possible to assign alias and to add filters. Have a look at Custom events filtering.
The empty array means the export of all the available events.
Event ID
Event name
lu
Level up
rp
Real Payment
tr
Tutorial step
ip
Ingame purchase
sc
Social network connect
sp
Social network post
gs
Sessions
uu
User update
ud
UDIDs
pe
Progression event
rg
Registration (install date)
sbs
Subscription (all actions with subscriptions)
adrv
Ad impressions. Data from ad networks or the Ad Impression event.
@basic_events
All events below
sbs_payments
Subscription (payments only)
Any custom event name
Custom event
@custom_events
All custom events
Property
Type
Description
name
string
Name of custom event
filters
object
Object with the filtering conditions.
Names of the object properties correspond with the name of custom event parameters. It is possible to apply filters to each of them.
Example
"filters":{
"paramName1":{
"gt": 5 // Events where paramName1>5. Have a look at List of comparison operators.
}
}
alias
string
Name of file in the report where to put the event with filter. The default name is set in the “name” property. Attention! If you export several equal events with different filters, the “alias” property is obligatory.
devtodevid
string
Unique identifier of the user which is used in devtodev and assigned to the user when he launches the app for the first time.
customuid
string
User ID, assigned by the developer.
idfa
string
iOS advertising identifier
idfv
string
iOS vendor identifier
advertisingid
string
Advertising ID (Android, Windows)
androidid
string
Android ID
created
int
Unix timestamp (ms) when the user opened the app for the first time
lasttime
int
Unix timestamp (ms) of the last user payment
publisher
string
Acquisition. The name of the publisher/ad network that led to the acquisition of the user
campaign
string
Acquisition. The name of the ad campaign that resulted in acquiring the user
placement
string
Acquisition. Place where the ad unit is located
ad
string
Acquisition. Name of ad unit/banner
firstpaymentdate
int
Unix timestamp (ms) of the first user payment
lastpaymentdate
int
Unix timestamp (ms) of the last user payment
paymentcount
int
Number of payments that the user have made in the app
paymentsum
number
Total sum of payments in USD
sbsfirstpaymentdate
int
Unix timestamp of the first subscription payment date
sbspaymentcount
int
The number of subscription payments made by the user in the app
sbspaymentsum
number
Total amount of subscription payments in USD
cheater
boolean
Whether the user has cheated or not (true/false
tester
boolean
Whether the user is a tester or not (true/false)
appversion
string
Current version of the app
firstappversion
string
App version installed by the user at the time of registration
sdkversion
string
Current version of devtodev SDK
level
int
Current user level
locale
string
User/device language (ISO 639-1, ISO 639-2, ISO 639-3)
country
string
User/device country (ISO_3166-1_alpha-2)
timezoneoffset
int
User timezone offset from UTC in milliseconds
pushavailable
boolean
True if there is a push token in devtodev DB
username
string
User name
string
User email
phone
string
User telephone number
photo
string
User photo url.
age
int
User age
gender
int
User gender. The values can be:
0 - Unknown gender
1 - Male
2 - Female
_AnyCustomUserPropertyName The prefix "_" here should be used to indicate that this is a custom property
string, number, boolean
Custom user card property, assigned by the developer.
API operator
Math operator
Description
gt
>
Greater than
lt
<
Less than
eq
=
Equal
gte
>=
Greater than or equal
lte
<=
Less than or equal
neq
!=
Not equal
eq
In the list
neq
Not in the list
Property
Type
Description
user_token
string
Individual user API token. It can be found on the space settings page. It is possible to send it with both POST and GET methods.
job_id
string
Job identificator which can be got from the response of job assignment.
Status code
Code
Value of "msg" field
Error description
400
2
Request body is empty
Empty body of the request. There is no POST data in the request.
400
3
Malformed json
JSON error in the body of the equest. Fix the formatting error.
401
11
Authorization error. Wrong user token %user_token value%
Authorization error. The set token is wrong. “User_token” field. User API token.
401
12
Authorization error.
User_token is not set.
Authorization error. “User_token” field is absent. User API token should be set either as a parameter in GET string of request or in POST body of request.
400
6
Invalid app id %app id value%
The requested project can not be found. Unknown application. This error can raise when a user makes a mistake with the app id or when the application with this ID was removed.
403
13
Access denied. You have no access to the app %app id value%
The error of access. User has no access to this application.
403
14
Access denied. You have no access to the report file %file id value%
The error of access. User has no access to this file. This error can raise if you have no access to the application used in the previously created request.
403
15
Access denied. You have no access to API.
The error of access. No access to User API token. This error can happen when the access rights were changed (in consequence of changing the user role or tariff plan)
403
16
Access denied. You have no access to RAW data export API.
The error of access. This error can raise when you have no rights to RAW data export API for your user role or tariff plan.
400
4
Field not found: %field_name%
An obligatory field can not be found. You need to complement the request with this field.
403
17
Quota exceeded. %% concurrent requests per user has been reached.
The limit of simultaneous jobs per user is exceeded. Wait until one of the jobs will be finished and repeat the request.
429
18
Too many requests. %% requests per day per user quota has been exhausted.
The daily limit of the user is exceeded. You can send the next request at the beginning of the next day.
429
19
Too many requests. %% requests per day per space quota has been exhausted.
The daily space limit is exceeded. You can send the next request at the beginning of the next day.
429
20
Too many requests. One request per %% seconds per user quota has been exhausted.
The limit of request frequency is exceeded. You have to wait for the time set in the error text.
404
21
File not found. The requested report file had been expired and was deleted.
The requested file can not be found. This can be when the file was removed due to the end of its lifetime. You have to repeat the job assignment and wait for the new file.
400
10
Incorrect report time frame interval:
start_date and end_date can not be earlier than 90 days from now.
Incorrect report time frame interval.
Both start and end date should be later than 90 days from now.
400
22
The job_id you requested is not found.
The job_id you requested is not found or the job was done and the report lifetime is exceeded.
400
5
Field %field_name% has type %received_type% but %expected_type% expected
The data type is not equal to the expected data type. Check the correspondence of the request with the format set in the documentation. Possible data types: boolean, integer, float, number (integer+float), string.
400
7
Unknown format: %format%
You have set the unknown export file format.
400
9
Event alias duplicated: %alias%
The event alias is duplicated. There should be no equal custom events without alias and no equal aliases in the request.
400
8
Unknown event: %event_name%
Unknown event. This error can raise when the event is not in @basic_event group or the event doesn’t exist or the event is blocked custom event.
500
1
Unknown Error
Unknown error. Please contact devtodev technical support.
Limitations
Value
Max number of job assignments per 24 hours per space
100
Max number of job assignments per 24 hours per user
50
Max number of simultaneous job assignments per user
5
Max timeout between user job assignments
5 seconds
Max time to perform one job
-
Max lifetime of the report file
24 hours
Max number of report file downloads
10
devtodev ID
Numeric user identifier in the projects’s Users table
Main ID
Main user identifier
Created
User registration date. Unix timestamp
Paying
Flags payers
Cheater
Flags cheaters
Tester
Flags testers
Level
Current user level
AppVersion
Current app version
Language
User’s device locale
Country
User country (set by IP address)
Device manufacturer
Device manufacturer
Device name
Device trademark name
Crossplatform User ID
User ID set by developer
Channel
Acquisition. User acquisition channel
InstallSource
Android. Android installer bundle
User agent
User agent
Screen resolution
Screen resolution of the device or app’s workspace
OS version
Version of the operating system
IDFV
iOS vendor identifier
IDFA
iOS advertising identifier
OPEN_UDID
OpenUDID
username
User name. Preset using the User card
useremail
User email. Preset using the User card
userphoto
User photo url. Preset using the User card
userphone
User telephone number. Preset using the User card
AdCampaign
Acquisition. The name of the ad campaign that resulted in acquiring the user
Time zone offset
User timezone offset from UTC in milliseconds
OsVersion
Version of the user’s operating system
segments
List of user custom segments containing this user. Segments separated by comma
Agency
Acquisition. Ad mediator name (Sub-publisher)
Keyword
Acquisition. Ad keywords and/or keywords that led to install
Placement
Acquisition. Place where the ad unit is located
Site
Acquisition. Website or app where the ad was placed
Ad group
Acquisition. Name of ad group
Ad
Acquisition. Name of ad unit/banner
segments
Comma separated segment names. The state at the time the data was exported.
abtests
Comma separated names of AB test groups. The state at the time the data was exported.
Custom property field name 1
User card custom property
Custom property field name N
User card custom property
devtodev ID
Numeric user identifier in the project’s Users table
time
Event (session start or end of activity) start date. Unix timestamp in milliseconds
session_starts
Session start. Marked as 1 when session started.
activity_duration
Duration of user activity (time the app was in focus)
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
level
User level at the time of event start
install_date
User registration date. Unix timestamp
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project's Users table
time
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
item_type
Item category
item
Item name
count
Amount of items the user bought
cheat
At the time of event start the user was a Cheater
isTester
At the time of event start the user was a Tester
install_date
User registration date. Unix timestamp
Virtual currency name 1
Amount of virtual currency spent on the item (overall)
Virtual currency name N
Amount of virtual currency spent on the item (overall)
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project’s Users table
install_date
User registration date. Unix timestamp
devtodev ID
Numeric user identifier in the project’s Users table
time
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
install_date
User registration date. Unix timestamp
spent
Amount of virtual currency spent by user on the previous level. List of currency names and amounts separated by comma.
Example: “Coins: 90, Gold: 10”
earned
Amount of virtual currency earned by user on the previous level. List of currency names and amounts separated by comma.
Example: “Coins: 90, Gold: 10
balance
Amount of virtual currency on user balance at the time of reaching a new level. List of currency names and amounts separated by comma.
Example: “Coins: 90, Gold: 10
bought
Amount of virtual currency bought by user for real currency on the previous level. List of currency names and amounts separated by comma.
Example: “Coins: 90, Gold: 10
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project’s Users table
logged ip
User IP address. Last digit of the address is anonymized
os_version
Version of the user operating system
devtodev ID
Numeric user identifier in the project’s Users table
date
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
transaction_id
Unique transaction identifier
transaction_name
Item name or SKU
amount_in_usd
Amount of real currency spent by user. Converted into USD using exchange rate at the moment the event is received by the devtodev server
status
Is transaction valid or not
install_date
User registration date. Unix timestamp
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project’s Users table
time
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
location
Game location name
success
Is location successfully completed (true/false)
prev_location
Name of the previous location
duration
Time spent on completing the location
difficulty
Location difficulty (numeric)
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
install_date
User registration date. Unix timestamp
spent
Amount of virtual currency or resources spent by user upon completing the location. List of currency names and amounts separated by comma.
Example: “Coins: 90, Gold: 10
earned
Amount of virtual currency or resources earned by user upon completing the location. List of currency names and amounts separated by comma.
Example: “Coins: 90, Gold: 10
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project’s Users table
time
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
social
Name of social media
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
install_date
User registration date. Unix timestamp
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the projest’s Users table
time
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
social
Name of social media
reason
Reason for publication or title of publication
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
install_date
User registration date. Unix timestamp
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project’s Users table
date
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
transaction_id
Unique transaction identifier
transaction_name
Subscription name or SKU
amount_in_usd
Amount of real currency spent by user. Converted into USD using exchange rate at the moment the event is received by the devtodev server
install_date
User registration date. Unix timestamp
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project’s Users table
date
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
transaction_id
Unique transaction identifier
transaction_name
Subscription name or SKU
action
An action to subscription. Examples:
purchased
changed renewal status
changed renewal pref
renewed
is_trial
Is subscription a trial or not
is_payment_received
Is payment successfully received or not
started_at
Subscription start date
expired_at
Subscription end date
amount_in_usd
Amount of real currency spent by user. Converted into USD using exchange rate at the moment the event is received by the devtodev server
install_date
User registration date. Unix timestamp
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project’s Users table
time
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
complete_state
Number of the completed step of the tutorial.
Also has predefined values:
0 – the user skipped the tutorial
-1 – the user started the tutorial
-2 – the user finished the tutorial
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
install_date
User registration date. Unix timestamp
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
devtodev ID
Numeric user identifier in the project’s Users table
Main ID
Main user identifier
IDFV
iOS vendor identifier
IDFA
iOS advertising identifier
Crossplatform User ID
User ID set by developer
Push token
User push token
devtodev ID
Numeric user identifier in the project’s Users table
Main ID
Main user identifier
IDFV
iOS vendor identifier
IDFA
iOS advertising identifier
Crossplatform User ID
User ID set by developer
logged
Date of user’s last activity
level
User level at the time of event start
language
User device locale
country
User country (from IP address)
sdk_version
SDK version at the time of data update
app_version
App version at the time of data update
created
User registration date. Unix timestamp
paying
Is user a payer or not
device_name
Device trademark name
cheater
At the time of event start the user was a Cheater
osversion
Version of the operating system at the time of the data update
devtodev ID
Numeric user identifier in the project’s Users table
date
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
placement
Place where the ad unit is located
network
Name of ad network responsible for placement
unit
Name of ad unit/banner
source
Ad impression data source
revenue
Ad impression revenue in USD
install_date
User registration date. Unix timestamp
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
devtodev ID
Numeric user identifier in the project’s Users table
date
Event (session start or end of activity) start date. Unix timestamp in milliseconds
level
User level at the time of event start
isTester
At the time of event start the user was a Tester
cheat
At the time of event start the user was a Cheater
install_date
User registration date. Unix timestamp
app_version
Application version. The data at the moment the event was generated.
segments
Comma separated segment names. The data at the moment the event was generated.
abtests
Comma separated names of AB test groups. The data at the moment the event was generated.
custom parameter name 1
Custom parameter value (string, number or boolean)
custom parameter name N (up to 30)
Custom parameter value (string, number or boolean)
Property
Type
Description
token
string
Push token. If you use push token, all fields with other identifiers will be ignored!
advertisingId
string
Advertising ID
androidId
string
Android ID
serialId
string
Serial ID
userId
string
User id is applicable if an internal identifier (cross-platform user identifier) is used in your app.
devtodevId
number
Numeric user identifier in devtodev database.
Property
Type
Description
title
string
A short string describing the purpose of a notification.
text
string
The text of an alert message.
data
object
Optional if notification is not hidden. You can pass custom parameters with messages and use them within an app. For instance, you can activate advertising campaign or any other functionality for a user who has received this message.
Example:
"data": {
"my_key": "value",
"my_another_key": "15"
}
small_icon
string
Optional. You may use an icon from resources of your app. You should use resource name of the icon in this field.
color
string
Optional. The parameter recolors the small icon of an app displayed in a notification in the specified color ("#RRGGBB"). This N parameter on Android also recolors the name of an app and texts on notification buttons.
Example:
"color": "#ff0000"
icon
string
Optional. Use the URL to a notification icon or a resource name.
image
string
Optional. The value is image URL. Images should be ≤ 450dp wide, ~2:1 aspect. The image will be center cropped.
sound
string
Optional. A media file to play in place of a default sound. If a sound file doesn’t exist or default is specified as the value, the default notification sound is played. The audio must be in one of the audio data formats that are compatible with system sounds. Supports “default” or the filename of a sound resource bundled in an app. Android sound files must reside in /res/raw/ If the option is not used, a notification comes silently.
badge
int
Optional. This property was added in Android O. The value of the badge on the home screen app icon. If not specified, the badge is not changed. If set to 0, the badge is removed.
vibration
boolean
Optional. In case of "true" during notification delivery a device will vibrate (if permission VIBRATION is received)
led_color
string
Optional. LED hex color ("#RRGGBB"), a device will do its best approximation.
Example:
"led_color": "#ff0000"
action
object
Optional. The action after a click on the body of a notification. By default, a click opens an app. It is also possible to perform the following actions:
deeplink (string) - Direct a user to a specific resource either within your app or on the web.
url (string) - Open a web page in a mobile browser, or any valid device-level URL such as Google Play or app protocol links.
share (string) - The Share Action drives a user to share your message when they interact with your push notification.
Examples:
"action": {
"url": "http://www.domain.com"
}
"action": {
"deeplink": "your-url-scheme://host/path"
}
"action": {
"share": "Happy holidays!"
}
interactive
object
Optional. It is possible to specify an array of notification buttons in an “interactive” object. Each button should contain the following properties:
id (string) - The button identifier. It is transferred to an app.
text (string) - A text on a button
handling (string) - The type of processing
background - The button closes a notification. The parameters of a notification are transferred to an app, but an app does not open. It is impossible to tie an action to a button in this regime.
foreground - The button opens an app. The parameters of a notification are transferred to an app, but an app does not open. It is possible to tie an action to a button in this regime. The list of actions and the principle is analogical to actions with the body of a message.
Example:
"interactive": {
"buttons": [{
"id": "accept",
"text": "Accept",
"handling":"foreground",
"action": {
"url": "http://www.domain.com/accept"
},
{
"id": "decline",
"text": "Decline",
"handling":"background"
}]
}
Property
Type
Description
hidden
boolean
Switching the notification to the hidden mode. If “true” - a notification will not be displayed to a user, but will be transferred to an app. Such a message must not contain any properties except data in the “payload” object.
priority
string
Optional. The priority of a notification. Default value is "normal". Specify one of the following values:
high" – GCM attempts to deliver high priority messages immediately allowing the GCM service to wake a sleeping device when possible and open a network connection to your app server. Apps with instant messaging, chat, or voice call alerts, for example, generally need to open a network connection and make sure GCM delivers the message to the device without delay. Set high priority only if the message is time-critical and requires the user’s immediate interaction, and beware that setting your messages to high priority contributes to a battery drain more compared to normal priority messages.
"normal" — This is the default priority for message delivery. Normal priority messages won't open network connections on a sleeping device, and their delivery may be delayed to preserve a battery. For less time-sensitive messages (such as notifications of new email or other data to sync) choose normal delivery priority.
expire
number
This option identifies the date when a notification is no longer valid and can be discarded. It is possible to use either relative time in seconds passed since the moment of sending, or specify an exact date in UNIX epoch format expressed in seconds (UTC).
Default value is 7 days (604800 seconds) after sending. Max. relative value for Android platform is 2 419 200 seconds (4 weeks).
Keep in mind that an "expire" value of 0 means messages that can't be delivered immediately will be discarded. However, as long as such messages are never stored, this provides the best latency for sending notifications.
collapse_key
string
Optional. Notifications are not collapsible by default.
If multiple messages are sent with this key, the most recent message will suppress all previous unread messages with the same key.
Collapsible messages are a better choice from a performance standpoint provided your application doesn't need to use non-collapsible messages. However, if you use collapsible messages, remember that GCM only allows a maximum of 4 different collapse keys to be used by the GCM connection server per registration token at any given time. You must not exceed this number, or it could cause unpredictable consequences.
channel_id
string
Optional. The notification's channel id (this property was added in Android O). The app must create a channel with this ID before any notification with this key is received. If you don't send this key in the request, or if the channel id provided has not yet been created by your app, devtodev SDK uses the channel id specified by default ("channel_id": "_devtodev" - name: General notifications).
badge_icon_type
int
Optional. This property was added in Android O (API level 26). 0 - Default. If this notification is being shown as a badge, always show as a number. 1 - If this notification is being shown as a badge, use the getSmallIcon() to represent this notification. 2 - If this notification is being shown as a badge, use the getLargeIcon() to represent this notification.
Property
Type
Description
token
string
Push token. If you use push token, all fields with other identifiers will be ignored!
advertisingId
string
Advertising ID
serialId
string
Hardware serial number
userId
string
User id is applicable if an internal identifier (cross-platform user identifier) is used in your app.
devtodevId
number
Numeric user identifier in devtodev database.
Property
Type
Description
title
string
Required. A short string describing the purpose of a notification.
text
string
Required. Main text of a notification message .
text2
string
Optional. Additional text of a notification.
data
object
Optional. You can pass custom parameters with messages and use them within an app. For instance, you can activate advertising campaign or any other functionality for the user who has received this message.
Example:
"data": {
"my_key": "value",
"my_another_key": "15"
}
icon
string
Optional. To replace the application icon (that shows up on the top left corner of the toast) use the URL or the resource name.
Any toast shown on Windows Phone 8.1 does not display the images (the app icon only). In Windows 10 the image is expressed using the URI of the image source, using one of these protocol handlers:
A web-based image: http:// or https://
An image included in the app package: ms-appx:///
An image saved to local storage: ms-appdata:///local/
A local image (Only supported for desktop apps.): file:///
sound
string
Optional. A media file to play in place of a default sound. If the option is not used, a notification comes silently. This property can have one of the following string values:
Default
IM
Reminder
SMS
Looping.Alarm
Looping.Alarm2
Looping.Alarm3
Looping.Alarm4
Looping.Alarm5
Looping.Alarm6
Looping.Alarm7
Looping.Alarm8
Looping.Alarm9
Looping.Alarm10
Looping.Call
Looping.Call2
Looping.Call3
Looping.Call4
Looping.Call5
Looping.Call6
Looping.Call7
Looping.Call8
Looping.Call9
Looping.Call10
On mobile platform, this property can also contain the path to a local audio file, with one of the following prefixes:
ms-appx:///
ms-appdata:///
action
object
Optional. Available for Windows 10 and WP 10 only. Action after a click on the body of a notification. By default, a click simply opens an app. It is also possible to perform the following actions:
deeplink (string) - Direct the user to a specific resource, either within your app or on the web.
url (string) - Open a web page in a mobile browser, or any valid device-level URL such as Windows Store or app protocol links.
share (string) - The Share Action drives a user to share your message when they interact with your push notification.
Examples:
"action": {
"url": "http://www.domain.com"
}
"action": {
"deeplink": "your-url-scheme://host/path"
}
"action": {
"share": "Happy holidays!"
}
interactive
object
Optional. Available for Windows 10 and WP 10 only. It is possible to specify an array of notification buttons in the “interactive” object. Each button must contain the following properties:
id (string) - Button identifier. It is transferred to an app
text (string) - Text on a button
handling (string) - The type of processing
background - A button closes an app. Notification parameters are transferred to an app, but an app doesn’t open. It is impossible to tie an action to a button in this regime.
foreground - A button opens an app. Notification parameters are transferred to an app. It is possible to tie an action to a button in this regime. The list of actions and the principle is analogical to actions with the body of a message.
Example:
"interactive": {
"buttons": [{
"id": "accept",
"text": "Accept",
"handling":"foreground",
"action": {
"url": "http://www.domain.com/accept"
},
{
"id": "decline",
"text": "Decline",
"handling":"background",
}]
}
Property
Type
Description
data
object
Required. You can pass custom parameters with messages and use them within an app. For instance, you can activate advertising campaign or any other functionality for user who has received this message.
Example:
"data": {
"my_key": "value",
"my_another_key": "15"
}
badge
string
Optional. A number from 1 to 99. A value of 0 is equivalent to the glyph value "none" and will clear a badge.
Instead of a number, a badge can display one of a non-extensible set of status glyphs:
activity
none
alarm
alert
attention
available
away
busy
error
newMessage
paused
playing
unavailable
It is also possible to send values incrementing or decrementing the current value in a “+2”, “-1” format. In case the previous value was the glyph or 0, the value will be increment. Decrement does not influence the zero value and the glyph.
Property
Type
Description
text1
string
First string on the tile.
with_header
boolean
Set True to mark "text1" field as a heading to show it larger.
text2
string
Second string on the tile.
text3
string
Third string on the tile.
text4
string
Fourth string on the tile.
image
string
Optional.Application-relative or Internet URI of the image.
Example:
"red.jpg" (if image is stored in an app’s installation directory or local storage folder)
"http://my.domain.com/img/red.jpg" (for Internet URIs).
We recommend using images with size 336 pixels by 336 pixels.
Important Note:
If you need to use remote Internet URIs for Tile images, you must take the following steps:
Ensure the remote image file size is less than 150 KB.
Ensure the image can be downloaded in 60 seconds or less.
Property
Type
Description
badge
string
A number from 1 to 99. A value of 0 is equivalent to the glyph value "none" and will clear a badge.
Instead of a number, a badge can display one of a non-extensible set of status glyphs:
activity
none
alarm
alert
attention
available
away
busy
error
newMessage
paused
playing
unavailable
Property
Type
Description
expire
number
This option identifies the date when the tile or toast is no longer valid and can be discarded. It is possible to use either relative time in seconds passed since sending, or to specify an exact date in UNIX epoch format date expressed in seconds (UTC). Default value is 7 days (604800 seconds) after sending.
HTTP Code
State
413
Wrong size of the data package (exceeds the maximum)
400
API key is absent
401
Wrong API key
403
Administrative restrictions on data received from a client
400
The error of data unpacking
{
"error_message":"Wrong GZIP format"
}
400
The error of JSON format
{
"error_message":"Wrong JSON format"
}
200
Package is received
200
The package is received, but there are errors found during the validation of events syntax.
The errors found are specified in an answer in the following format:
1.
{
"errors": {
"rg": {
"expected": "[timestamp]",
"received": [
"[timestamps]",
"[timestaTTmp]"
]
}
}
}
The message indicates that there have been received fields listed under the tag "received", but there are no fields that are listed under the tag "expected" among them. Such an event will not be processed.
2.
{
"errors": {
"rg": {
"expected": "[timestamp]",
"useless": [
"[timestamps]",
"[timestaTTmp]"
]
}
}
}
The message indicates that there have been received extra fields listed under the tag "useless", however, fields listed under the tag "expected" are enough. Such an event will be processed.
EN
Evernote
RT
FB
RR
Renren
GM
Google Mail
TB
Tumblr
GP
Google+
TW
IN
VK
VK
OK
Odnoklassniki
VB
Viber
PI
WP
Qzone
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...
API operator
Math operator
Description
gt
>
Greater than
lt
<
Less than
eq
=
Equal
gte
>=
Greater than or equal
lte
<=
Less than or equal
neq
!=
Not equal
eq
In the list
neq
Not in the list
Status code
Code
Value of "msg" field
Error description
500
1
Unknown Error
Unknown error. In case it repeats, please contact technical support.
400
2
Request body is empty
Request body is empty. There is no POST data in the request.
400
3
Malformed json
There is an error of JSON format in the request body. Fix the error of format.
400
4
Field not found: %field_name%
The required field is not specified in the request. Please add it to the request.
400
5
Field %field_name% has type %received_type% but %expected_type% expected
The type of data doesn't match the expected type. Follow the recommendation and change the data type to the expected one. It is possible to use the following types of data: boolean, integer, float, number (integer+float), string.
400
6
Invalid app id %app id value%
The requested app is not found. The app is unknown. The error can appear in case the specified app identifier is wrong or when the app has been removed.
401
11
Authorization error. Wrong user token %user_token value%
Authorization error. The specified User API token is wrong. Check the value of the specified key.
401
12
Authorization error. User_token is not set.
Authorization error. User API token is not specified in the request parameters. It is necessary to specify User API token ("user_token" field) in every request.
403
13
Access denied. You have no access to the app %app id value%
Access error. The owner specified in the User API token request has no access rights to the app specified in the same request.
403
15
Access denied. You have no access to API.
Access error. You have no access to devtodev API. The error can appear when User API token owner's access rights to the service API are changed as a result of the change of the user's role or the change of the price plan.
403
23
Access denied. You have no access to Labels API.
Access error. The error can appear in case the User API token owner has no access to the Labels API service due to the limitations of the user's role or limitations of the price plan of the space.
400
28
Unexpected value for field %field%. Received value: %value%. Expected values: %values%.
Unexpected value for the field. Follow the recommendations and correct the request.
400
29
Unexpected field %field%
The request contains the field that is not specified in the documentation. The field must be excluded from the request.
400
30
Invalid value for field %field%. Received value: %value%. Expected: %description%
Invalid value has been attributed to the field. Follow the recommendations and correct the request.
404
34
No results matched the request
The requested data is missing.
429
35
Quota exceeded. %% new labels per day per application quota has been exceeded.
The daily limit is exceeded. Tomorrow you will be able to add labels to the app again.
400
37
New labels array should not contain more than %% elements.
The array of labels contains more than 30 elements. Reduce the number of labels created in one request.
429
36
Quota exceeded. %% new labels per day per user quota has been exceeded.
The daily limit is exceeded. You will be able to add a new set of labels tomorrow.
400
38
Labels feature is not available for cross-platform projects
The labels feature is not available for cross-platform projects. Labels can be applied only to ordinary apps or branch-apps of cross-platform projects.
Name
Field
Limitation
Label name
name
not more than 10 symbols
Short description of a label
description
not more than 512 symbols
Category name
category
not more than 30 symbols
If, for some reason, you cannot use the devtodev SDK, or some events cannot be tracked on the client side, you can use the devtodev data API. Using the API, you can send a set of events that almost completely replicates the capabilities of the SDK. However, you will need to independently prepare data about the device/user and also independently track the start and duration of sessions.
https://api.devtodev.com/v2/analytics/report?appId=sampleApplicationId
Field | Required | Description |
---|---|---|
POST data is received by the server in compressed or text form, depending on the value of the "Content-type" field in the HTTP header.
All the transferred data must be in UTF8 encoding.
The archive must contain JSON with one or more events for one or several users.
The packet size cannot exceed 2 MB in its uncompressed state. Packages that exсeed this size can't be processed.
Header | Type | Required | Description |
---|---|---|---|
The reports
object contains:
Each packet consists of the following fields:
The server responds with code 200 if everything is OK.
Contains information about the user's device. It must be sent as the first event when a new user is created. Additionally, it is desirable to send an event at the beginning of each session.
Example
Sends information about the start of a new session.
Example
Sends information about the duration of user activity. This can be either the full length of the session or a part of the user's session while the application was in focus.
Example
This event denies/allows tracking of user data and also implements the right to be forgotten in accordance with the requirements of the GDPR.
A developer must use this event in case a user doesn’t want their data to be sent and processed in the devtodev system.
When calling the event with the parameter "trackingAllowed": false, it is 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.
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.
Example
Service event. Not obligatory. Ping event for the server. It is required to correctly display a player online if more than 5 minutes have passed since his last sent event.
Example
Each devtodev project can have up to 30 custom user properties.
Attention! We strongly recommend that you do not use these properties to transfer and store data that fits the definition of personal data!
Predefined user properties (in addition to 30 custom user properties).
Example
If you want to track non-basic events (below), you can create custom events of your own. How you are going to apply them, depends solely on you.
devtodev supports not more than 300 custom event names in a single project. Events that exceed the limit of custom event names will be discarded. Try to integrate the tracked actions by type to the event name level, and move the characteristic tags to the parameters.
For example, if you need to track purchases of “Paper” and “Pen” items, you don’t need to create two events with the names “Paper Purchase” and “Pen Purchase”. Instead. create a single “Purchase” event and add an “Item” parameter with the appropriate value of “Paper” or “Pen”. This way, you can use just one event to track many items.
For a string parameter, you can use no more than 50,000 unique values for the entire history of events. If the number of unique values exceeds the limit, the parameter gets locked by the system and is discarded from the received data. Therefore, we don’t recommend using highly variable parameters like user IDs or time as string values (moreover, they are automatically added to the event).
We strongly recommend that you do not change the data type passed in the same parameter. If you change the data type in a parameter, it will be duplicated with the same name, which may cause issues while processing reports.
We strongly recommend that you do not use custom event properties to transfer and store data that fits the definition of personal data!
Example
To track payments in a real currency, dispatch this event right after the system validates that the payment went through successfully. The event is fundamental and mandatory for all the app metrics related to monetization.
By default (easy to change in the app’s settings), the devtodev server invalidates transactions with previously-used identifiers. Additionally, the server performs identifier checks based on their outer appearance in order to avoid obvious fraud.
Example
Tracks the progress of the user's initial training (tutorial). The event is used to build a funnel through which users go through learning stages (steps). Each step is represented by an integer greater than 0. If you plan to add additional intermediate learning steps, you can number the steps initially, for example, in increments of 10. Additionally, three constants are used to describe the start of training, successful completion of training, and skipping the entire training process.
Recommended sequence for dispatching events:
Training started (-1).
Sequential sending of events at the entrance to the next learning step (1...N).
Completion of training after passing the last step of training (-2).
he tutorial skip logic assumes that a single event with a value of 0 is sent, replacing the entire sequence described above.
Example
This event is for games only.
Pass this event after every purchase if you want to track in-app (virtual) currency spends and items’ popularity. You can apply this event to both games and any apps with virtual currency.
Example
This event is for games only.
The event involves the accumulation of in-game currency or resources. It contains data on the amount of in-game currency earned or purchased by the user. It is highly undesirable to send this data transactionally. Instead, please send aggregated data for a specific period, such as 5-10 minutes. Additionally, the accumulation of data must be interrupted, and an event should be sent if the user's level has changed.
Attention! The total number of tracked unique resources (virtual currencies) cannot exceed 30 items throughout the project's lifespan.
Furthermore, apart from grouping by type (earned/purchased), there is also a grouping by the source of income.
This event is for games only.
This event is used to generate a preset game report called Economy Balance (currency balance with grouping by days). This report shows the approximate amount of virtual currency on users' hands, which is useful for planning and checking the results of campaigns aimed at removing excess virtual currency from the application.
This event should not be sent more than once per day for a user.
Example
This event is for games only.
Leveling up the user (player). The event is triggered when the user reaches a new level. In addition o the achieved level number, you can also include data on the balance of virtual currencies or resources at the time the new level was reached, as well as the total amount of currencies or resources spent, earned and purchased by the user during the previous level progression.
Attention! The total number of tracked unique resources (virtual currencies) cannot exceed 30 items throughout the entire life of the project.
Example
This event is for games only.
First of all, the progression event is used in games with short (within one game session) areas/game levels, for example, match 3 games. You can use the event to collect data on how well or how fast users complete levels, how difficult it is for them, how many resources they gained or spent, and other relevant parameters.
parameters object:
Example
All events generated during the passage of the location are recommended to be marked with the key "inProgress," the value of which indicates the name of the location (Progression event name).
Example
Tracking the source of the application installation. Sent once per user. Does not need to be sent if ad trackers such as AppsFlyer are integrated in the project settings or the devtodev custom postback API is used.
Example
The event is used for individual tracking of ad revenue on user devices. This 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 event 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.
Example
The event tracks the user's connection to a social network. It is sent at the moment when the application receives information about the successful authorization of the user on the social network.
Example
Preset social network codes
The event tracks the user's posts on the social network. It is dispatched when a success report is received from the network, if possible.
Example
An example of a package describing a single session of a single user.
Note: devtodev does not accept data that is older than 7 days and data that is more than 3 hours in the future. If you want to use this example, you will need to edit the timestamp
parameters.
Parameter | Type | Required | Description |
---|---|---|---|
Parameter | Type | Required | Description |
---|---|---|---|
HTTP Code | State |
---|---|
Parameter | Platform | Required | Type | Description |
---|---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Property | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Parameter | Required | Type | Description |
---|---|---|---|
Social Network | Code |
---|---|
Parameter | Required | Type | Description |
---|---|---|---|
appId
Yes
devtodev application ID
Content-type
String
Yes
The possible values for the "Content-type" field are:
application/json - for sending uncompressed JSON data
application/zstd - for sending data compressed using Facebook's standard algorithm
application/gzip - for sending data compressed using gzip algorithms
deviceId
String (64)
Yes
Current (actual) Device ID
previousDeviceId
String (64)
Should be sent if the Device ID is changed
Previous Device ID
userId
String (64)
When accounting by User ID
Current (actual) User ID
previousUserId
String (64)
Should be sent if the User ID is changed (renamed)
Previous User ID
devtodevId
Long
No
Numeric user/device account ID in the devtodev database. We recommend using this identifier if you are using SDK and API at the same time. Get this identifier on the SDK side, save it on your server and use it to send data via API. Sending other identifiers is not necessary in this case.
package
Array
Yes
Packets with events that happened to the user (see below)
language
String (3)
Yes
User/device language (ISO 639-1, ISO 639-2, ISO 639-3)
country
String (2)
Yes
User/device country (ISO_3166-1_alpha-2). Only needed in the server-server protocol
ip
String (15)
No
The IP address of the device. Only needed in the server-server protocol. Used to determine the user's country if country is not specified
appVersion
String (64)
No
App version
appBuildVersion
String
No
Application build version. A string value is used for compatibility across all platforms
sdkVersion
String
No
Version of the integrated SDK
bundle
String
No
Application bundle
engine
String
No
Application platform/engine (Native, Unity, Unreal, Air)
installationSource
String
No
Only for Android. The installer bundle is passed as the value. It determines where the application was installed from (apk, Google Play, Amazon, etc). Used to detect and prevent illegal apk installs
events
Array
Yes
Events in the order they are generated (details below)
413
Incorrect size of the data packet (exceeds the maximum)
400
devtodev App ID is absent
401
Incorrect devtodev App ID
403
Administrative restrictions on data received from a client
400
The error of data unpacking
{
"error_message":"Wrong GZIP format"
}
400
The error of JSON format
{
"error_message":"Wrong JSON format"
}
200
OK. Data received
code
Any
Yes
String
The unique ID of the event. Takes the value "di"
timestamp
Any
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
osVersion
Any
No
String
Operating system version
os
Any
No
String
OS family name (Android, iOS, Mac, Windows…)
displayPpi
Any
No
Int
Screen pixel density
displayResolution
Any
No
String
Screen resolution in pixels, sent as "longSide"x"shortSide" ("1024x768")
displayDiagonal
Any
No
Double
Screen size (inches)
manufacturer
Android, iOS, Mac
No
String
Device manufacturer (Apple, Samsung)
model
Android, iOS, Mac
No
String
Device model. Value of the name (iOS), model (Android)
deviceType
Any
No
Int
Device Type: 0 - Unknown 1 - Phone 2 - Tablet 3 - Desktop 4 - Watch 5 - TV 6 - Simulator
timeZoneOffset
Any
No
Int
The UTC offset (or time offset) in seconds
rooted
Any
No
Int
Is the device rooted
isLimitAdTrackingEnabled
iOS, Android, Windows
No
Bool
Whether ad tracking restriction is enabled
userAgent
Any
No
String
User-Agent header
idfv
iOS, Mac
No
String
identifierForVendor
idfa
iOS, Mac
No
String
advertisingIdentifier
androidId
Android
No
String
Device SSAID. Not recommended for use
advertisingId
Android, Windows
No
String
Advertising ID
serialId
Android, Windows
No
String
Build.Serial (Android). Not recommended for use.
uuid
Android, Windows,
iOS, macOS
No
String
instanceId
Android
No
String
InstanceId.Get();
sandboxState
iOS
No
Int
Information about how the application is built: undefined (0) / sandbox (1) / production (2)
code
Yes
String
The unique ID of the event. Takes the value "ss"
timestamp
Yes
Long
The date of the new session start. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
sessionId
No
Long
The ID of the current session. This is a kind of key by which you can link all user events that occurred during one session. This can be a session start timestamp, or you can use some custom numeric ID, or the user's session sequence number if you have that data.
code
Yes
String
The unique ID of the event. Takes the value "ue"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
length
Yes
Int
Full session duration or a part of a user session in seconds
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "ts"
trackingAllowed
Yes
Bool
Enable (true) or disable (false) user tracking
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
code
Yes
String
The unique ID of the event. Takes the value "al"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "pl"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
parameters
Yes
Object<Key, Value>
User characteristics in key-value format. May contain predefined (tester, cheater, name, email, phone, photo, gender, age) and custom user propery names.
User custom property values can be a number, a string (up to 500 symbols), or a boolean value
sessionId
No
Long
The ID of the current session
tester
No
bool
Set true if user is a tester. This user's data will not be used to calculate metrics.
cheater
No
bool
Set true if user is a cheater. This user's data will not be used to calculate metrics.
code
Yes
String
The unique ID of the event. Takes the value "ce"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
name
Yes
String (72)
Custom event name
parameters
No
Object<Key (32),Value>
Custom event parameters
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "rp"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
productId
Yes
String (255)
Product name. We recommend using the product SKU
orderId
Yes
String (64)
Unique transaction ID
price
Yes
Double
Price in user currency
currencyCode
Yes
String (3)
ISO 4217 alphabetic code of the user's currency
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "tr"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
step
Yes
Int
Tutorial step number or predefined values (0, -1, -2 see above)
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "vp" ("ip" in the previous version of the API)
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
purchaseAmount
Yes
Int
Number of items purchased
purchasePrice
Yes
Object<String (24), Number>
Currency and price of the purchased items (or currencies, if there are multiple)
purchaseType
Yes
String (96)
The group to which the item belongs
purchaseId
Yes
String (32)
Item ID or name
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "ca"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
bought
Yes one or both (bought and earned)
Object<String, Object<String (24), Number>>
Resources of the type "bought" (purchased) aggregated over a specific period by source and resource name
earned
Yes one or both (bought and earned)
Object<String, Object<String (24), Number>>
Resources of type "earned" aggregated over a specific period by source and resource name
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "cb"
balance
Yes
Object<String, Long>
User's balances of virtual currencies or resources at the time the event was generated
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "lu"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level achieved by the user
balance
No
Object<String (24), Number>
User's balances of virtual currencies or resources at the time of leveling up
spent
No
Object<String (24), Number>
Total expenses of resources (virtual currency) by the user during level progression
In the SDK, this data is aggregated from virtual currency payment events
earned
No
Object<String (24), Number>
The total amount of resources (virtual currency) earned by the user during level progression
In the SDK, this data is aggregated from CurrencyAccrual events with the "earned" type
bought
No
Object<String (24), Number>
The total number of resources (virtual currency) purchased by the user for real currency during level progression
In the SDK, data is aggregated from the CurrencyAccrual events with the "bought" type
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "pe"
timestap
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
parameters
Yes
Object
Event parameters. See below
spent
No
Object<String (24), Number>
Resources consumed during an area completion
earned
No
Object<String (24), Number>
Resources earned during an area completion.
name
Yes
String (40)
The name of the event. It is usually the number or the name of the area/location/level.
sessionId
No
Long
difficulty
No
Int
An optional difficulty value
source
No
String (40)
The name of the previous progression event used for connecting events together. E.g. a previous area visited by the player
success
Yes
Bool
The completion event result: “true” if successful, “false” if unsuccessful/lost
duration
Yes
Long
Time in seconds taken to complete the area
code
Yes
String
The unique ID of the event. Takes the value "rf"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
source
No
String
Ad network name
campaign
No
String
Ad campaign name
content
No
String
Campaign content (for example, for A/B testing of site elements or contextual ads)
medium
No
String
Traffic type
term
No
String
Campaign search term (for example, PPC keywords)
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "adrv"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
source
No
String (100)
Impression data source name
ad_network
Yes
String (100)
The name of the ad network that delivered the impression
placement
No
String (100)
Placement of the banner
ad_unit
No
String (100)
Banner title
revenue
Yes
Double
Reward for displaying a banner in USD
sessionId
No
Long
The ID of the current session
code
Yes
String
The unique ID of the event. Takes the value "sc"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
socialNetwork
Yes
String
Code or name of the social network. May contain predefined values (see below)
sessionId
No
Long
The ID of the current session
Vkontakte
vk
tw
fb
Google Plus
gp
wp
Viber
vb
Evernote
en
Google Mail
gm
in
pi
Qzone
rt
Renren
rr
Tumblr
tb
code
Yes
String
The unique ID of the event. Takes the value "sp"
timestamp
Yes
Long
The date the event was generated. Unix timestamp in milliseconds
level
Yes
Int
User (player) level at the time the event was generated
socialNetwork
Yes
String
Code or name of the social network. May contain predefined values (see above)
postReason
Yes
String
Reason for posting
sessionId
No
Long
The ID of the current session