Skip to main content

Attribute-Hints

Definition

This document provides a detailed walkthrough of the fireing attribute-hint

Triggers and Dispatch Conditions of the Attribute-Hints

The SDK will trigger attribute-hints updates under the following conditions: when attribute-hints data has not been previously sent to the receiver, or when the attribute-hints data differs from the last request, as stored in the "attributesStore" table in indexedDB. If the SDK is initialized and no record exists in indexedDB for the attribute-hints, it will create a new record and set the hintsSent flag to false. Additionally, if the current device ID and DID from the indexedDB record differ during SDK initialization, the SDK will initiate attribute-hint firing. Upon successful completion of an ongoing request, the SDK will update the hintsSent flag to true.

The schema of attribute-hints

{
'type': 'attribute-hint',
'data': {
'available_resolution_x': number,
'available_resolution_y': number,
'device_memory': number,
'gpu_renderer': string,
'gpu_vendor': string,
'hardware_concurrency': number,
'language': string,
'languages': string[],
'pixel_depth': number,
'pixel_ratio': number,
'platform': string,
'resolution_x': number,
'resolution_y': number,
'timezone_offset': number,
'touch': boolean,
'user_agent': string,
'vendor': string,
'pa_open_time': number
},
'timestamp': number
}

attribute-hint parameters

available_resolution_x

Amount of horizontal space in pixels available to the window

available_resolution_y

Amount of vertical space in pixels available to the window

device_memory

Approximate amount of device memory in gigabytes

gpu_renderer

Renderer string of the graphics driver

gpu_vendor

Vendor string of the graphics driver

hardware_concurrency

Number of logical processors available to run threads on the user's computer

language

The language of device

languages

Array of strings representing the user's preferred languages

pixel_depth

Bit depth of the screen

pixel_ratio

Ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device

platform

Platform(value is web)

resolution_x

Width of the screen in pixels

resolution_y

Height of the screen in pixels

timezone_offset

The difference between UTC time and local time

touch

Device has touch contact points

user_agent

User-Agent string for the current browser

vendor

Either "Google Inc.", "Apple Computer, Inc.", or (in Firefox) the empty string.

pa_open_time

Indicates the time of the last session generation.