Mobile OS Version

30 views
Skip to first unread message

sreenu malae

unread,
Apr 13, 2020, 9:13:09 AM4/13/20
to AdWords API and Google Ads API Forum
Hello Team,
Currently I'm using the following query.
$query = "SELECT ad_group_ad.ad.name,ad_group_ad.ad.type,ad_group_ad.resource_name, ad_group_ad.status,metrics.clicks,metrics.ctr,metrics.impressions,segments.ad_network_type,segments.device  FROM ad_group_ad where segments.date BETWEEN '$startdateAND '$endate'";

I would like to get the mobile OS Version along with these metrics. Is there anyway to get the OS version?
I

Google Ads API Forum Advisor Prod

unread,
Apr 13, 2020, 12:56:59 PM4/13/20
to sreen...@gmail.com, adwor...@googlegroups.com
Hi Sreenu,

You won't be able to get OS related data from the ad_group_ad level. You can get this data from the campaign_criterion level and select fields from the operating_system_version_constant

Regards,
Anthony
Google Ads API Team

ref:_00D1U1174p._5001UZXmFE:ref

sreenu malae

unread,
Apr 13, 2020, 4:06:14 PM4/13/20
to AdWords API and Google Ads API Forum
Hey Anthony,

Thanks for your reply

As per previous post

$query = "SELECT campaign_criterion.operating_system_version.operating_system_version_constant FROM campaign_criterion"
$response = $googleAdsServiceClient->search($customerId$query, ['pageSize' => self::PAGE_SIZE]); 
foreach ($response->iterateAllElements() as $googleAdsRow) {
echo($googleAdsRow->getCampaignCriterion()->getOperatingSystemVersion());
}
I tried the above code But still i'm not getting the proper output. I'm getting a object and i think has null values Can you please help me out.

Google Ads API Forum Advisor Prod

unread,
Apr 14, 2020, 10:23:37 AM4/14/20
to sreen...@gmail.com, adwor...@googlegroups.com
Hi Sreenu,

You can use fields from the operating_system_version_constant such as operating_system_version_constant.id or operating_system_version_constant.name. If you are still facing null values, you can reply privately to author your report request and response so I can take a closer look.
Reply all
Reply to author
Forward
0 new messages