# UserDeviceTechnicalId

In each datamart, all device information is stored within a device graph:

* Devices are represented by **UserDevicePoint**
* Device identifiers are represented by **UserDeviceTechnicalId**

A UserPoint can have multiple user device points. A user device point can have multiple user device technical identifiers, and one device info.

<pre><code><strong>UserPoint
</strong>|
|---------UserDevicePoint--------------------------DeviceInfo: PC - CHROME BROWSER
|                |---------UserDeviceTechnicalId: 1P cookie
|                |---------UserDeviceTechnicalId: Network ID
|                |---------UserDeviceTechnicalId: 3P cookie
|
|---------UserDevicePoint--------------------------DeviceInfo: ANDROID TABLET
|                |---------UserDeviceTechnicalId: Mobile advertising id
|                |---------UserDeviceTechnicalId: Mobile vendor id
</code></pre>

## Organizing device technical identifiers within registries

Device technical identifiers are related to a registry. There are 6 types of registries:

<table><thead><tr><th width="261.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>INSTALLATION_ID</code></td><td>For each site on which the installation ID feature is activated, a registry of type <code>INSTALLATION_ID</code> is created.</td></tr><tr><td><code>MOBILE_ADVERTISING_ID</code></td><td>Registries representing mobile advertising ids that can be shared across editors are related to this type. It includes for instance Android Advertising IDs (AAID) and Apple Identifier for Advertisers (IDFA).</td></tr><tr><td><code>MOBILE_VENDOR_ID</code></td><td>Registries representing mobile ids that can be only be shared among apps of the same developer account are related to this type. This includes for instance Apple Identifier for Vendors (IDFV).</td></tr><tr><td><code>TV_ADVERTISING_ID</code></td><td>Includes all registries that refer to Smart TVs and TV boxes: AAID on Android TV and Android boxes, IDFA on Apple TV, Amazon Advertising ID on Fire TV, Tizen Advertising ID on Samsung Smart TV etc.</td></tr><tr><td><code>NETWORK_DEVICE_ID</code></td><td>For registries designating IDs that are device-related &#x26; managed by third parties actors. For instance ID5, First-ID etc.<br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span>Some network identifiers are directly user-related and not device related (such as the ones generated from the email)</td></tr><tr><td><code>CUSTOM_DEVICE_ID</code></td><td>If you want to use your own device identifier (for instance: a 1P cookie that you generate), you can create it under this type.</td></tr><tr><td><code>MUM_ID</code></td><td><p>"mediarithmics User Mapping Identifier"</p><p>This type and the single registry it contains are dedicated to hosting mediarithmics 3P cookie (vector_id) and references to partners' 3P cookies, until their deprecation</p></td></tr><tr><td><code>IP_V4_ADDRESS_ID</code></td><td>Registry used to store IPv4 addresses. Can be automatically generated when activating IP addresses auto capture on a channel</td></tr><tr><td><code>IP_V6_ADDRESS_ID</code></td><td>Registry used to store IPv6 addresses. Can be automatically generated when activating IP addresses auto capture on a channel</td></tr></tbody></table>

Registries are related to organisations. You can manage them by going to **Navigator** > **Settings** > **Organisation** > **Device registries**.

You can create your own registries under the types `MOBILE_VENDOR_ID` and `CUSTOM_DEVICE_ID`, `IP_V4_ADDRESS_ID`, `IP_V6_ADDRESS_ID` or subscribe to existing registries under other types. For more information of IP addresses refer to [this page](/user-points/user-identifiers/networks-ids/device-based-network-ids/ip-address.md). Once created, you can activate them on the organisation datamarts.

You can set up a expiration duration for identifiers stored in registries you created manually. This will only apply to identifiers captured after setting up the expiration duration.

Registries of type `INSTALLATION_ID` are automatically created and removed by the platform.

{% hint style="warning" %}
Do not forget to create or subscribe to the required registries before using them to identify user data. If user data is received under unknown registries, identifiers will be removed and data may not be ingested properly.
{% endhint %}

{% hint style="info" %}
Two web browsers on the same desktop PC are considered as two distinct agents. For example, your Chrome browser on your Windows laptop is a different device than your Firefox browser on the same laptop. On smartphones, the web browser and the phone itself are considered as two distinct agents.
{% endhint %}

Some device registry identifiers require **Channel** configuration updates to trigger tracking using them on your websites properly.

## Merge of device points

When two device technical ids are associated, the related device points are merged. This can happen:

* When capturing user activities with multiple identifiers
* When using the [identifier association feature](/data-streams/data-ingestion/bulk-processing/user-identifiers-association.md)

{% hint style="info" %}
If the related device points are linked to different UserPoint, a merge of device points will induce the [merge of UserPoint](/user-points.md#user-points-merges) as well.
{% endhint %}

{% hint style="info" %}
For some ids that are considered as probabilistic (e.g. that can create false positive matchings of users), the merge of UserDevicePoint/UserPoint will not be allowed to avoid inconsistencies in your ID graph.

You contact your Account manager for additional information&#x20;
{% endhint %}

## Description of device graph documents

Hereafter is the description of the documents and their properties, as they can be fetched on the APIs.

### User device point

| Property               | Type                        | Description                                                                                                                                                                             |
| ---------------------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                     | String                      | The document identifier. Formatted as `udp:-1234`                                                                                                                                       |
| type                   | Enum UserIdentifierType     | In the case of device points, this property takes the value `"USER_DEVICE_POINT"`                                                                                                       |
| creation\_ts           | Timestamp                   | Timestamp at which the device point was created                                                                                                                                         |
| last\_activity\_ts     | Timestamp                   | <p>Last time an event was ingested from this device.<br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span><em>This property is not updated at the moment.</em></p> |
| device                 | Object of type `DeviceInfo` | Description of the device through a set of normalized properties                                                                                                                        |
| technical\_identifiers | List of objects             | List of available identifiers for the device                                                                                                                                            |

### &#x20;`device` property of user device point

| Property         | Type                       | Description                                                                                                                                                                                                                                                                                 |
| ---------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| brand            | String                     | The brand of the device (ex.: "Apple")                                                                                                                                                                                                                                                      |
| model            | String                     | The model of the device (ex.: "Iphone 14")                                                                                                                                                                                                                                                  |
| agent\_type      | Enum UserAgentType         | Indicates the type of device. Possible values: `WEB_BROWSER`, `MOBILE_APP` or `CTV_APP`                                                                                                                                                                                                     |
| browser\_family  | Enum BrowserFamily         | <p>If the device is a browser.</p><p>Possible values: <code>OTHER</code>, <code>CHROME</code>, <code>IE</code>, <code>FIREFOX</code>, <code>SAFARI</code>, <code>OPERA</code>, <code>STOCK\_ANDROID</code>, <code>BOT</code>, <code>EMAIL\_CLIENT</code>, <code>MICROSOFT\_EDGE.</code></p> |
| browser\_version | String                     | The version of the browser.                                                                                                                                                                                                                                                                 |
| form\_factor     | Enum FormFactor            | Indicates the format of the device. Possible values: `PERSONAL_COMPUTER`, `SMART_TV`, `GAME_CONSOLE`, `SMARTPHONE`, `TABLET`, `WEARABLE_COMPUTER`, `OTHER`.                                                                                                                                 |
| os\_family       | Enum OperatingSystemFamily | The operating system family of the device. Possible values: `WINDOWS`, `MAC_OS`, `LINUX`, `ANDROID`, `IOS`, `TIZEN`, `WEB_OS`, `ANDROID_TV`, `GOOGLE_TV`, `TV_OS`, `FIRE_TV`, `ROKU_TV`, `TITAN_OS`, `OTHER`.                                                                               |
| os\_version      | String                     | The version of the operating system (ex.: "macOS 10.15 Catalina")                                                                                                                                                                                                                           |
| carrier          | String                     | The service provider that ensures connectivity of the device.                                                                                                                                                                                                                               |

### User device technical identifier

| Property           | Type              | Description                                                                                                                                                                                                                 |
| ------------------ | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| user\_agent\_id    | String            | <p>The value of the identifier.<br>See format <a href="#user_agent_id-formatting">hereunder</a></p>                                                                                                                         |
| registry\_id       | String            | The registry to which the technical identifier                                                                                                                                                                              |
| type               | Enum RegistryType | <p>The type of the registry to which it is attached.</p><p>See <a href="#organizing-device-technical-identifiers-through-registries">section above</a> for possible values</p>                                              |
| creation\_ts       | Timestamp         | Timestamp at which the document was created                                                                                                                                                                                 |
| last\_activity\_ts | Timestamp         | <p>Last time an event was ingested with this identifier.<br><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span><em>This property is not updated at the moment.</em></p>                                 |
| expiration\_ts     | Timestamp         | <p>Timstamp at which this document will expire.<br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span><em>For the moment, technical ids are stored for a period of 1 year after their creation</em></p> |

{% hint style="info" %}
The properties available in the documents might differ slightly from the ones of the runtime schema.
{% endhint %}

## `user_agent_id`

`user_agent_id` property allows to use device identifiers in a single property by concatenating several informations such as registry type, registry id and the id value.

### user\_agent\_id formatting - Cookie-based identifiers

#### Installation ID - First-party cookie generated by mediarithmics

The Installation ID can appear in different formats depending on where it is used:

<table><thead><tr><th width="179">Location</th><th>Value format</th><th>Example</th></tr></thead><tbody><tr><td>Cookie stored in the user' browser</td><td><code>&#x3C;version_prefix>&#x3C;base64(value)></code> w</td><td><code>aMGQ0YTU4Y2EtMTRlNS0xMWVlLWJlNTYtMDI0MmFjMTIwMDAy</code></td></tr><tr><td>Used in authenticated endpoints</td><td><code>ins:&#x3C;registry_id>:&#x3C;value></code></td><td><code>ins:1001:0d4a58ca-14e5-11ee-be56-0242ac120002</code></td></tr><tr><td>Stored in mediarithmics &#x26; used in non authenticated endpoint </td><td><code>ins:&#x3C;registry_token>:&#x3C;version_prefix>&#x3C;base64(value)></code></td><td><code>ins:first:aMGQ0YTU4Y2EtMTRlNS0xMWVlLWJlNTYtMDI0MmFjMTIwMDAy</code></td></tr></tbody></table>

{% hint style="info" %}
Note that `version_prefix` is currently defined as `a`.
{% endhint %}

#### Vector ID - mediarithmics third-party cookie

mediarithmics offers to use its third-party cookie, the vector ID. More information can be found on the [cookie documentation](https://developer.mediarithmics.io/user-points/user-identifiers/pages/-MVHeKVgEo5Qf_eNRREb#cookies-installed-on-the-third-party-domain-.mediarithmics.com).

mediarithmics third-party cookie can be used as a user identifier with two different formats:

* `vec:<value>`
* `mum:<value>`

Both formats are equivalent: the first one is the exact format stored in the cookie, the second one is the one stored as a technical identifier in the the datamart.

Example: `vec:89998434` / `mum:89998434`

For a given device point, the vector ID can be retrieved:

* In the `technical_identifiers` list as a device technical id of type MUM\_ID ; in which case the identifier format will be `mum:89998434`
* In the `mappings` list related to the device point

#### Partners' third party cookies

The formatting of advertising cookie values from Google and Xandr is a bit specific due to the historical activity of mediarithmics as a DSP provider:

* `tech:goo:<value>` for Google advertising cookies
* `tech:apx:<value>` for Xandr advertising cookies

For other partners, their third-party cookie value is attached to a web domain that is defined by mediarithmics. The identifier format is as follows:

* `web:<web_domain_id>:<value>`&#x20;

The web domain designates the `partner-domain.com` and `value` the identifier value inside the cookie on `partner-domain.com`.

### user\_agent\_id formatting - Mobile application identifiers

#### Mobile advertising identifiers

The generic format for mobile advertising ids is:

* `mob:<os>:<encoding>:<value>`.

The `os` field designates the OS of device: `and` for Android, `ios` for iOS.

The `encoding` field describes how the value is encoded. Available values are: `raw` for no encoding, `sha1` for SHA1, `md5` for MD5.

The `value` field contains the mobile advertising id value, encoded according to the previous field. The non-encoded ID should be in lower case for Android and in uppercase for iOS.

Example:

```
mob:ios:raw:12345654-ABCD-1234-A1B2-123456789876
mob:and:raw:12345678-abcd-1234-a1b2-123456789876
```

#### Mobile vendor identifiers

The compressed format for mobile vendor ids is:

* `mov:<os>:<registry_id>:<value>`

The `os` field designates the OS of device: `and` for Android, `ios` for iOS.

The `registry_id` field designates the registry to which this device id should be linked.

`value` refers to the identifier value as generated within the mobile application.

### user\_agent\_id formatting - CTV identifiers

#### CTV advertising identifiers

The generic format for CTV advertising ids is:

* `tv:<registry_id>:<value>`&#x20;

#### IP addresses captured on CTV channel

* `ipv4:<registry_id>:<value>` for registries of type  `IPV4_ADDRESS_ID`
* `ipv6:<registry_id>:<value>` for registries of type  `IPV6_ADDRESS_ID`

&#x20;`value` will contain the raw IP address (no hashing or normalization)

{% hint style="info" %}
While there is no registry dedicated to store CTV vendor identifiers, you can still use either custom registries or Mobile vendor ones (if you want to store the value of the `os` in the identifier)
{% endhint %}

### user\_agent\_id formatting - Other device identifiers

* `net:<registry_id>:<value>` for device technical ids of type `NETWORK_ID`
* `dev:<registry_id>:<value>` for type `CUSTOM_DEVICE_ID`
* `udp:<value>` if you want to use directly the device point identifier instead of a custom device identifier.

## User agents (legacy)

{% hint style="warning" %}
User agent is a legacy format that is being replaced replaced by user device points and user device technical identifiers.
{% endhint %}

User agents are the legacy format to store device identifiers. Several user agents can be attached to a UserPoint, and each user agent has a device info object.

```
UserPoint
|
|---------UserAgent: vec:1111--------------------------DeviceInfo: PC - CHROME BROWSER              
|
|---------UserAgent: vec:2222--------------------------DeviceInfo: ANDROID TABLET
```

All user agents are identified by a vector ID.

User agents have the following properties:

| Property     | Type      | Description                                                                                                                                       |
| ------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| vector\_id   | String    | Unique ID generated by mediarithmics and associated with each agent                                                                               |
| device       | Object    | Device pieces of information such as operating system and browser                                                                                 |
| creation\_ts | Timestamp | When the user agent was registered on the platform                                                                                                |
| mappings     | Array     | Additional identifiers called the device mappings. They are cookie-based identifiers or mobile application identifiers associated with the agent. |

Two web browsers on the same desktop PC are considered as two distinct agents. For example, your Chrome browser on your Windows laptop is a different device than your Firefox browser on the same laptop. On smartphones, the web browser and the phone itself are considered as two distinct agents.

Agent-based operations like visiting a website or seeing an ad will generally automatically leverage the user agent to identify the user. You can use an agent to identify a user, usually with a `user_agent_id` field in the requests.

<pre class="language-javascript"><code class="lang-javascript"><strong>// Browser based agent
</strong>{
    "vector_id": "vec:12345654321",
    "device": {
        "form_factor": "SMARTPHONE",
        "os_family": "IOS",
        "browser_family": "SAFARI",
        "browser_version": null,
        "brand": null,
        "model": null,
        "os_version": null,
        "carrier": null,
        "raw_value": null,
        "agent_type": "WEB_BROWSER"
    },
    "creation_ts": 1591712194234,
    "mappings": [
        {
            "user_agent_id": "tech:goo:Cazrazrkazeeza-azeree9-azezrze",
            "realm_name": "GOOGLE_OPERATOR"
        },
        {
            "user_agent_id": "tech:apx:12345654321654321",
            "realm_name": "APP_NEXUS_OPERATOR"
        }
    ]
}
</code></pre>

The `value` field contains the string value in lower case, after the optional encoding.

```javascript
// Mobile application agent
{
    "vector_id": "vec:12345654321",
    "device": {
        "form_factor": "OTHER",
        "os_family": "OTHER",
        "browser_family": null,
        "browser_version": null,
        "brand": null,
        "model": null,
        "os_version": null,
        "carrier": null,
        "raw_value": null,
        "agent_type": null
    },
    "creation_ts": 1573405364473,
    "mappings": [
        {

            // IDFA user agent id with raw encoding: mob:ios:raw:6d92078a-8246-4ba4-ae5b-76104861e7dc
            // IDFA user agent id with SHA1 encoding: mob:ios:sha1:d520a80c026be39edeb9c6e3f37c01f2da5f5e97
            // AAID user agent id with raw encoding: mob:and:raw:97987bca-ae59-4c7d-94ba-ee4f19ab8c21
            // AAID user agent id with MD5 encoding: mob:and:md5:ba06c008973b8a1bff6e087c6149227f
            "user_agent_id": "mob:ios:raw:12345654-8246-1234-ae5b-123456454654",
        }
    ]
},
```


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://developer.mediarithmics.io/user-points/user-identifiers/userdevicetechnicalid.md?ask=<question>
```

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

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