Problem With Report Segments

147 views
Skip to first unread message

Pete Lavetsky (AdWords API Guru)

unread,
Mar 26, 2020, 11:22:52 AM3/26/20
to AdWords API and Google Ads API Forum
Hi All,

I'm attempting to migrate our Geo Performance report from AdWords -> Ads. I end up with this query:

query: "select customer.id, geographic_view.country_criterion_id, segments.geo_target_most_specific_location, metrics.cost_micros, metrics.impressions, metrics.clicks, segments.ad_network_type, segments.geo_target_city, metrics.conversions from geographic_view where segments.date   DURING   LAST_30_DAYS "


I get lots of unique rows back, but I also get some rows back that contain the same segmentation data with different metrics. 


For example, for the query above I will get back some rows that contain identical:


customer.id

geographic_view.country_criterion_id

segments.ad_network_type

segments.geo_target_city


I would expect the query to result in one row per unique grouping of the above.

Here's an example result from the above query where I've already done an internal conversion to CSV, but the conversion was done per google_ads_row so each single line still corresponds to a single google_ads_row


Customer ID,Country/Territory,Most specific location,Cost,Impressions,Clicks,Network,City,Conversions

961,2124,9000783,0,519,0,Search Network,1002334,0

961,2124,9000783,6430000,69,6,Search Network,1002334,0


I'd expect the 961, 2124, 9000783, Search Network and 1002334 to be grouped together in one row.


Is there additional segmenting being done on segments.date even tho it's not a select field? If so, I would've expected more than 2 rows if segmenting by date since I'm asking for last 30 days of data.


Thanks

Pete

Google Ads API Forum Advisor Prod

unread,
Mar 27, 2020, 9:38:48 AM3/27/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Thank you for reaching out. Please try adding geographic_view.location_type to your query to see if that is the difference in these values. It won't segment by date unless you explicitly tell it to. If this still doesn't solve the issue, please share the downloaded report and your client customer ID via Reply privately to author.

Regards,
Mitchell
Google Ads API Team

ref:_00D1U1174p._5001UXWpr8:ref

Pete Lavetsky (AdWords API Guru)

unread,
Mar 30, 2020, 8:39:18 AM3/30/20
to AdWords API and Google Ads API Forum
Good morning Mitchell,

I've added in geographic_view.location_type to my query but still receiving "bad" results ... example query with redacted credentials:

Request
-------
MethodName: google.ads.googleads.v3.services.GoogleAdsService/Search
Headers: {developer-token=REDACTED, login-customer-id=XYZ, x-goog-api-client=gl-java/1.8.0_161 gapic/ gax/1.50.1 grpc/1.25.0}
Body: customer_id: "961"
query: "select customer.id, geographic_view.country_criterion_id, segments.geo_target_most_specific_location, metrics.cost_micros, metrics.impressions, metrics.clicks, segments.ad_network_type, segments.geo_target_city, metrics.conversions, geographic_view.location_type from geographic_view where segments.date   DURING   LAST_30_DAYS "
page_size: 5000


Example results with Ads API:

961,2124,9000804,12860000,228,13,Search Network,1002405,0,LOCATION_OF_PRESENCE
961,2124,9000804,0,599,0,Search Network,1002405,0,LOCATION_OF_PRESENCE
961,2124,9000804,4752525,613,1,Content,1002405,0,LOCATION_OF_PRESENCE
961,2124,9000804,4460200,344,1,YouTube Watch,1002405,0,LOCATION_OF_PRESENCE

"bad" segment for the Search Network 

Here's how the same report returns for the AdWords API:

961,2124,9000804,12860000,827,13,Search Network,1002405,0.00,Physical location
961,2124,9000804,4752525,613,1,Display Network,1002405,0.00,Physical location
961,2124,9000804,4460200,344,1,YouTube Videos,1002405,0.00,Physical location

I'm happy to provide more information if needed.

Thanks
Pete

Pete Lavetsky (AdWords API Guru)

unread,
Mar 30, 2020, 11:23:16 AM3/30/20
to AdWords API and Google Ads API Forum
I've discovered what the difference is here. Our AdWords API request asked for "AdNetworkType1", which results in Search Network ( in this example ). The Ads API column is segments.ad_network_type which can result in Search or Search Partners.

So, AdWords API would group both those types into one, where the Ads API will segment them out. We're transforming the value to Search Network in order to maintain parity with previously expected values. 

I'll have to do some more work on my end for this.

Pete

Google Ads API Forum Advisor Prod

unread,
Mar 30, 2020, 11:30:36 AM3/30/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Glad you figured it out! Feel free to reach out with any additional issues you may have.
Reply all
Reply to author
Forward
0 new messages