How to get products under specific product groups?

752 views
Skip to first unread message

Oliver

unread,
Dec 28, 2021, 4:25:12 AM12/28/21
to AdWords API and Google Ads API Forum
Hi,

I'm aware I can use product_group_view to get the list of product groups (aka listing groups) in a campaign.

I'm also aware I can use shopping_performance_view to get the list of products in a campaign.

I'm trying to determine which products fall under which product groups.  I don't see a way to use the product group IDs I get from product_group_view when querying the products data from shopping_performance_view.

What am I missing?  Is there any way I can determine which products fall under which product group?

Oliver


Google Ads API Forum Advisor

unread,
Dec 28, 2021, 11:18:43 AM12/28/21
to oliver....@gmail.com, adwor...@googlegroups.com
Hi Oliver,

In  product_group_view you can segment by 'ad_group_criterion.listing_group.parent_ad_group_criterion' to get the product group that the product is part of. The rows containing a productItemId and the same ad_group_criterion.listing_group.parent_ad_group_criterion are part of the same serving group.

Feel free to get back to us. If there is any UI screen that has what you are looking for, could you privately send us a full screen screenshot?

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2TlP6J:ref

Oliver

unread,
Dec 28, 2021, 12:37:47 PM12/28/21
to AdWords API and Google Ads API Forum
Hi Aryeh,

Thanks for your response.  I don't believe, however, this is how it works.  product_group_view gives us data about only product groups (listing groups), and not individual products.  The product_item_id you're referring to is the that of the product group subdvision.  The parent_ad_group_criterion gives us the parent subdivion and not the product.

If I'm mistaken, can someone please correct me but, from what I see, product_group_view returns data about product groups only while shopping_performance_view returns data about products only and there is no way to link these 2 data sets or figure out which products belong to which product group.

Oliver

Google Ads API Forum Advisor

unread,
Dec 28, 2021, 4:45:47 PM12/28/21
to oliver....@gmail.com, adwor...@googlegroups.com
Hi Oliver,

'product_item_id' will give the product Id, every product is also a product group. A real group won't have a product Id. I tested this and it works. 

Oliver

unread,
Dec 29, 2021, 3:09:41 AM12/29/21
to AdWords API and Google Ads API Forum
Hi Aryeh,

The scenario you're talking about works only if the product groups are subdivided by item ID.  This way, each product group represents one product and hence why you see product_item_id in the data returned from product_group_view.

However, subdividing by item ID is not the only way of subdividing product groups. In fact, it's not common at all.  Product groups can also be sub-divided by brand, type, etc. in which case the product_item_id will not be available in the data returned from product_group_view.

Has anyone else tried to solve this problem before?  Your contribution is much appreciated.

Oliver

Google Ads API Forum Advisor

unread,
Dec 29, 2021, 8:35:45 AM12/29/21
to oliver....@gmail.com, adwor...@googlegroups.com

Hi Oliver,

Could you provide us with the Ads UI screenshot that you are looking for and the complete logs when you tried to get corresponding data through Google Ads API, so that our team can check better? You may send those using the Reply privately to author option, for privacy purposes.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2TlP6J:ref

Oliver

unread,
Dec 29, 2021, 8:55:37 AM12/29/21
to AdWords API and Google Ads API Forum
I have now replied privately. Thanks

Oliver

Mat

unread,
Dec 29, 2021, 9:19:20 AM12/29/21
to AdWords API and Google Ads API Forum
Hi Oliver,

what is missing is the functionality to segment the shopping_performance_view report by the product_group_view.resource_name or the criterion_id of the product_group.
It would have to be a segment, because a product can be assigned to different product groups in the reporting period, since these are basically just a kind of filter, not a fixed structure, such as ad groups.

I think you could, however, reverse engineer the current structure of your product_groups (using the attributed ad_group_criterion resource to the product_group_view) and then check, which combination of segments.product_brand, segments.product_channel etc. associated to a segments.product_item_id of the shopping_performance_view would match with that structure. But that would be a really messy job - and you still wouldn't know if a reported product_item_id in the shopping_performance_view is even still in the shopping feed. So you would have to check that too (which is currently not possible via the Google Ads API). Instead you'd have to use the Content API for Shopping for this job.

Regards
Mat

Google Ads API Forum Advisor

unread,
Dec 29, 2021, 3:46:39 PM12/29/21
to oliver....@gmail.com, adwor...@googlegroups.com
Hi Oliver,

Thank you for privately sending your video description of what you are looking for. In product_group_view there is a field 'ad_group_criterion.listing_group.case_value.product_type.value' that matches in shopping_performance_view the 'segments.product_type_l1' field.  To go from product_group_view to shopping_performance_view you can match them in the 'WHERE' clause.

Feel free to get back to us, for is only tested in the specific case you presented.

Regards,

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2TlP6J:ref

Google Ads API Forum Advisor

unread,
Dec 29, 2021, 3:59:14 PM12/29/21
to m...@keyword-experte.de, adwor...@googlegroups.com
Hi Mat,

Thank you for chiming in. To address more cases than is described by Oliver you can take the ad_group_criterion.display_name field from product_group_view, it has the specifics brand and product type etc.. in the hierarchy. You could also use ad_group_criterion.listing_group.case_value.product_type.value and ad_group_criterion.listing_group.case_value.product_type.level to find matching shopping_performance_view segments that match.

Feel free to send to us privately a full screen screenshot or video of the UI of what you are looking for in the API.

Google Ads API Forum Advisor

unread,
Dec 29, 2021, 4:40:35 PM12/29/21
to m...@keyword-experte.de, adwor...@googlegroups.com
Hi Mat,

To cover more of this topic, shopping_performance_view report can be segmented by ad group, this will take care metrics of products in a product group for a specific ad group. The product_group_view is already segmented by ad group.

Oliver

unread,
Dec 30, 2021, 3:54:02 AM12/30/21
to AdWords API and Google Ads API Forum
Thanks for the responses.

Regarding Aryeh's response:  The solution you're proposing is essentially to find out the full criteria of a product group (type, brand, ID, etc.) by analyzing the heirarchy in the ad_group_criterion.display_name and then filtering the shopping_performance_view with those conditions.  This is the same as the reverse engineering solution Mat mentioned.  In additon to the problems Mat mentioned with this solution, there is also another reason this solution will not work. 

Consider the scenario when one of the subdivisions in your hierarchy is the Everything else product group (see the screenshot below).  In the example I show in the screenshot, the cafe appliances product group sits under a parent called Everything else in kitchen>cooking.....  The condition of this parent node is basically the opposite of all other nodes at that parent level.  Hence, for me to filter by that condition I'll have to find all other nodes, etc. and work out the opposite condition of all of them.  You can see how messy this can get.

What we need is, like what Mat said, a way to segment the shopping_performance_view by the product group ID (i.e. ad_group_criterion.criterion_id). At the moment, shopping_performance_view can't be segmented by anything related to the product groups. Segmenting by adgroup is not of much help because obviously there are lots of product groups per adgroup and we want to zoom into one product group only.

I considered using the Content API for this but my understanding is that API deals only with the data in the Merchant Centre and hence doesn't know anything about the product group structure.  Please correct me if I'm wrong.

It's puzzling why something as simple as this is so hard to do in the API.  In the Google UI, it's very easy to see the products under a product group. 

Any ideas?

ss.PNG

Oliver

Google Ads API Forum Advisor

unread,
Dec 30, 2021, 5:41:16 PM12/30/21
to oliver....@gmail.com, adwor...@googlegroups.com
Hi Oliver,

Thank you for getting back to me and laying this out. I raised with my team a request to add as a segmenting field in shopping_performance_view a product group criterion Id so that you can easily go from product group view to the products within the group view. This request is subject to review. You may monitor our blog for an update.
Message has been deleted

Google Ads API Forum Advisor

unread,
Dec 31, 2021, 5:40:27 AM12/31/21
to oliver....@gmail.com, adwor...@googlegroups.com

Hi Oliver,

I had to delete your last post as you posted your email address. For privacy purposes, you may avoid providing email addresses or any other sensitive data publicly. As for your concern, our team has already created a feature request and for now, you may keep an eye on our blog for updates or announcements. Let us know if you have any additional questions.

Regards,

Google Logo
Yasar
Google Ads API Team
 

 

 



ref:_00D1U1174p._5004Q2TlP6J:ref

Mat

unread,
Dec 31, 2021, 6:10:04 AM12/31/21
to AdWords API and Google Ads API Forum
Hi Yasar,

This is somewhat ironic (and not very funny) because this poorly administered Google Group sends out the unabridged, complete Google login email addresses of all contributors to anyone who has subscribed to the digest.
I have already pointed this out a long time ago and several times - unfortunately without any success.

Regards
Mat


Reply all
Reply to author
Forward
0 new messages