Google ads api

40 views
Skip to first unread message

maxcode ITSolutions

unread,
Jul 17, 2023, 5:17:18 AM7/17/23
to Google Ads API and AdWords API Forum
What does it mean by device=4 or device=3

I am using this query 
"SELECT segments.date,segments.device,metrics.cost_micros,metrics.clicks,metrics.impressions FROM campaign WHERE segments.date BETWEEN '2022-07-17' AND '2023-07-17'"

and response is like 
[ {
    segments: { date: '2022-09-28', device: 4 },
    metrics: { cost_micros: 12900000, clicks: 2, impressions: 44 }
  },
  {
    segments: { date: '2022-09-29', device: 4 },
    metrics: { cost_micros: 11020000, clicks: 2, impressions: 34 }
  }]

I am trying to make a graph like device.png attached below.




device.png

Google Ads API Forum Advisor

unread,
Jul 17, 2023, 7:08:56 AM7/17/23
to maxcodeit...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to Google Ads API Forum.

Please note segments.device has a data type of ENUM. Can you confirm if this number value is returned in the API response while using the client library? If yes, you may check on this device.proto guide describing the devices. As per the guide, TABLET = 3 and DESKTOP = 4

If you have further clarifications regarding these enum values, I recommend reaching out to the respective client library owner by filing an issue on the issue tracker on the Issues tab of your chosen client library on the github, so that they can provide guidance regarding these enum values.

 
This message is in relation to case "ref:_00D1U1174p._5004Q2n8NPx:ref"

Thanks,
 
Google Logo Google Ads API Team


maxcode ITSolutions

unread,
Jul 17, 2023, 9:09:04 AM7/17/23
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Thank you for your response. 
Its really helpful.
Reply all
Reply to author
Forward
0 new messages