Device Tag Exports
The device tags stores arbitrary tags against a user and their device, acting as an acceleration layer for real-time targeting via personalisation tools. This document outlines the structure, delivery, and format of the device tag data export.
Requesting Access
To request access to device tag exports for your integration, please contact customer support with the following information:
- Client ID
- Desired destination (S3 bucket details)
- Desired export frequency
Export Destinations
Amazon S3
Exports are delivered directly to your Amazon S3 bucket.
- Requires: Bucket name, region, and appropriate IAM permissions.
- This is the primary destination for all exports.
Export Types
Full Exports: Each export contains the complete dataset of all device tags, regardless of when they were last modified.
Export Scheduling
Exports can be configured to run at the following intervals:
- Hourly: Every hour at a specified minute.
- Daily: Once per day at a specified time (UTC).
- Weekly: Once per week on a specified day and time (UTC).
- Custom: Custom scheduling requirements can be met.
Data Formats
Exports are available in JSON (default) and CSV. The export is delivered as a ZIP file containing the data file. The JSON export is a list of device tag objects.
Export Sample
The devicetags export contains all device and user tag information.
Sample Export:
[
{
"_id": "62fcd5e16f0058187878a67c",
"clientId": "TEST_CLIENT",
"deviceId": "f7x3f45c-d8dd-4b3d-96f6-84ef005a92e1",
"authId": 14967390,
"associatedIds": [
{
"type": "onesignalId",
"value": "b51b18c4-f159-416b-87d8-452cd0d752c6"
}
],
"sessionCount": 42,
"duration": 2754,
"language": "EN",
"location": null,
"country": "GB",
"platform": "ANDROID",
"appVersion": "1.4.7",
"osVersion": "28",
"lastSession": "2023-09-21T10:36:50.073Z",
"createdAt": "2022-08-17T11:49:53.764Z",
"updatedAt": "2024-10-11T09:36:16.177Z",
"tags": [
{ "name": "example_tag", "value": "true", "type": "boolean" },
{ "name": "another_tag", "value": "123", "type": "number" }
],
"audiences": [
{ "name": "active_user", "value": "true", "type": "boolean" }
]
}
]Field Description:
| Field | Type | Description |
|---|---|---|
| _id | string | Unique identifier for the device record (ObjectID). |
| clientId | string | Client identifier. |
| deviceId | string | Unique identifier for the device. |
| authId | number | The authenticated user's ID (if logged in). |
| associatedIds | array | An array of objects for additional identifiers (e.g., onesignalId). |
| sessionCount | number | The total number of sessions recorded for this device. |
| duration | number | The total session duration in seconds. |
| language | string | The device's language setting. |
| location | object | Device location data. |
| country | string | The device's country. |
| platform | string | The device platform. |
| appVersion | string | The version of the client application. |
| osVersion | string | The version of the device's operating system. |
| lastSession | string | Timestamp of the last recorded session. |
| createdAt | string | Timestamp when the device record was created. |
| updatedAt | string | Timestamp of the last modification to the record. |
| tags | array | An array of tag objects applied to the device. Each object contains name (string), value (any), and type (string). |
| audiences | array | An array of tag objects representing audience membership. Each object contains name (string), value (any), and type (string). |
Updated about 5 hours ago
