Specifies one or more device types to operate on. For example, Clicks.for_device_type("mobile")
returns the number of clicks from mobile devices during the report's time range.
If you don't use this function, a formula operates on data for all device types.
You can attach this function to any expression in the formula language that can be segmented by device type. For example, you can add it to the end of any function call, column reference (Search Ads 360-provided columns, Floodlight activity columns, or other formula columns), Search Ads 360 variable, or constant value, as long as the data can be segmented by device type. Learn more about reporting by device type.
Syntax
.for_device_type("type")
.for_device_type("type", "type", ...)
Parameter
- type
- Specify any of the following device types, surrounded by quotes:
- Desktop
- Mobile
- Tablet
- Other
Examples
-
Actions.for_device_type("Mobile", "Tablet")
returns total actions recorded on mobile devices and tablets. -
c:"Email Signups".for_device_type("Mobile", "Tablet")
returns total actions on mobile and tablet devices from a specific Floodlight activity column. -
(Actions.for_device_type("Mobile")) * 0.9
weights actions on mobile devices. -
Actions.for_device_type("Desktop") / Visits.for_device_type("Desktop")
returns the cost per visit on desktop devices. -
Revenue.for_device_type("Tablet") / Cost.for_device_type("Tablet")
ROAS for tablet devices. -
GA_transaction_revenue.for_device_type("Mobile") / GA_transactions.for_device_type("Mobile")
returns the revenue per transaction on mobile devices as reported by Google Analytics. -
to_percent(
(Clicks.for_device_type("Tablet") +
Clicks.for_device_type("Mobile") ) /
Clicks.for_device_type("Desktop")
)
returns the ratio of clicks on desktops to clicks on mobile and tablets.