GeographicView - migrating form v9 to v10

75 views
Skip to first unread message

AH

unread,
May 16, 2022, 8:08:48 PM5/16/22
to Google Ads API and AdWords API Forum
Hi,
we are migrating from v9 to v10 and we discovered that when querying geographic_view we get slightly different data back in v10 compared to v9.
Here is a script that we use to compare:

client = GoogleAdsClient.load_from_dict(config_dict=config_dict, version="v9")
ads_service = client.get_service("GoogleAdsService", version="v9")

clientv10 = GoogleAdsClient.load_from_dict(config_dict=config_dict, version="v10")
ads_servicev10 = clientv10.get_service("GoogleAdsService", version="v10")

query=f"""
SELECT
    customer.id,
    customer.descriptive_name,
    campaign.id,
    campaign.name,
    campaign.status,
    ad_group.id,
    ad_group.name,
    ad_group.status,
    segments.date,
    segments.device,
    metrics.conversions,
    metrics.impressions,
    metrics.clicks,
    metrics.cost_micros,
    metrics.average_cost,
    metrics.average_cpc,
    metrics.average_cpm,
    geographic_view.country_criterion_id,
    geographic_view.location_type
FROM geographic_view
WHERE segments.date BETWEEN '2022-01-01' AND '2022-01-01'
"""
account_id = "XXXXXXXXXXX"

response = ads_service.search_stream(customer_id=account_id, query=query)
responsev10 = ads_servicev10.search_stream(customer_id=account_id, query=query)

data = [json_format.MessageToDict(row._pb, preserving_proto_field_name=True) for batch in response for row in batch.results]
datav10 = [json_format.MessageToDict(row._pb, preserving_proto_field_name=True) for batch in responsev10 for row in batch.results]

Questions:
1) why responses are different for v9 and v10?
1) are there any documented changes in geographic_view v10 compared to v9 ?

Thank you.


AH

unread,
May 19, 2022, 3:23:20 PM5/19/22
to Google Ads API and AdWords API Forum
Any ideas?
Reply all
Reply to author
Forward
0 new messages