Hi Scratch,
To get all your targeted and excluded geographic locations per campaign you can query "SELECT
campaign.id, campaign_criterion.location.geo_target_constant, campaign_criterion.negative, campaign_criterion.type FROM campaign_criterion WHERE campaign_criterion.type = 'LOCATION'". The negative criterion are the excluded places.
To get metrics per targeted location per campaign you can query "SELECT metrics.clicks, metrics.cost_micros, metrics.conversions, metrics.impressions, campaign_criterion.location.geo_target_constant,
campaign.id FROM location_view WHERE segments.date BETWEEN '20220101' AND '20220310'", you can change the date between in the 'WHERE' CLAUSE.
To interpret what a location is, you can query "SELECT geo_target_constant.target_type, geo_target_constant.status, geo_target_constant.resource_name, geo_target_constant.parent_geo_target,
geo_target_constant.name,
geo_target_constant.id, geo_target_constant.country_code, geo_target_constant.canonical_name FROM geo_target_constant". If you want to know the parent location you can trace it in the results.
Regards,
|
Aryeh |
Google Ads API Team |
|
|
|
ref:_00D1U1174p._5004Q2XmRLE:ref