Issue getting device targeting information google ads api
I want to get Device Targeting Information from Google Ads Api as show in below screen shot:
Currently from what i get from the documentation i am doing this :
string query = $@"SELECT campaign_criterion.device.type FROM campaign_criterion"; // also tried this query query = $@"SELECT campaign.id, campaign_criterion.device. FROM Device WHERE campaign.id = {campaignId}"; PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> result = googleAdsService.Search(customerId.ToString(), query); foreach (GoogleAdsRow criterionRow in result) { DeviceInfo device = criterionRow.CampaignCriterion.Device; }
I have randomly tried many other but i always see NULL in Device i have been able to successfully get Keywords , Ad Schedule View and works fine but cannot seem to get this working any help is appreciated.