Google Ads Data Manager V1 Client - Class DeviceInfo (0.5.0)

Reference documentation and code samples for the Google Ads Data Manager V1 Client class DeviceInfo.

Information about the device being used (if any) when the event happened.

Generated from protobuf message google.ads.datamanager.v1.DeviceInfo

Namespace

Google \ Ads \ DataManager \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ user_agent
string

Optional. The user-agent string of the device for the given context.

↳ ip_address
string

Optional. The IP address of the device for the given context. Note:Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the About offline conversion imports page for more details.

↳ category
string

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.

↳ language_code
string

Optional. The language the device uses in ISO 639-1 format.

↳ screen_height
int

Optional. The height of the screen in pixels.

↳ screen_width
int

Optional. The width of the screen in pixels.

↳ operating_system
string

Optional. The operating system or platform of the device.

↳ operating_system_version
string

Optional. The version of the operating system or platform.

↳ model
string

Optional. The model of the device.

↳ brand
string

Optional. The brand of the device.

↳ browser
string

Optional. The brand or type of the browser.

↳ browser_version
string

Optional. The version of the browser.

getUserAgent

Optional. The user-agent string of the device for the given context.

Returns
Type
Description
string

setUserAgent

Optional. The user-agent string of the device for the given context.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getIpAddress

Optional. The IP address of the device for the given context.

Note:Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the About offline conversion imports page for more details.

Returns
Type
Description
string

setIpAddress

Optional. The IP address of the device for the given context.

Note:Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the About offline conversion imports page for more details.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getCategory

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.

Returns
Type
Description
string

setCategory

Optional. The category of device. For example, “desktop”, “tablet”, “mobile”, “smart TV”.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getLanguageCode

Optional. The language the device uses in ISO 639-1 format.

Returns
Type
Description
string

setLanguageCode

Optional. The language the device uses in ISO 639-1 format.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getScreenHeight

Optional. The height of the screen in pixels.

Returns
Type
Description
int

setScreenHeight

Optional. The height of the screen in pixels.

Parameter
Name
Description
var
int
Returns
Type
Description
$this

getScreenWidth

Optional. The width of the screen in pixels.

Returns
Type
Description
int

setScreenWidth

Optional. The width of the screen in pixels.

Parameter
Name
Description
var
int
Returns
Type
Description
$this

getOperatingSystem

Optional. The operating system or platform of the device.

Returns
Type
Description
string

setOperatingSystem

Optional. The operating system or platform of the device.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getOperatingSystemVersion

Optional. The version of the operating system or platform.

Returns
Type
Description
string

setOperatingSystemVersion

Optional. The version of the operating system or platform.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getModel

Optional. The model of the device.

Returns
Type
Description
string

setModel

Optional. The model of the device.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getBrand

Optional. The brand of the device.

Returns
Type
Description
string

setBrand

Optional. The brand of the device.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getBrowser

Optional. The brand or type of the browser.

Returns
Type
Description
string

setBrowser

Optional. The brand or type of the browser.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getBrowserVersion

Optional. The version of the browser.

Returns
Type
Description
string

setBrowserVersion

Optional. The version of the browser.

Parameter
Name
Description
var
string
Returns
Type
Description
$this
Create a Mobile Website
View Site in Mobile | Classic
Share by: