PMax Listing Group Status Found Via API Not Matching Account UI

121 views
Skip to first unread message

Reid Hommedahl

unread,
Feb 27, 2024, 10:21:58 PM2/27/24
to Google Ads API and AdWords API Forum
Hi there, 

I've created a script that fetches the status of a listing group from our PMax campaign, and the API response is saying that the asset_group_listing_group_filter, type_ is "UNIT_INCLUDED". However, in the browser, I can see that the listing group is not included, and it's actually excluded. 

The campaign IDs match, but it seems like the asset group IDs are different that what's showing in the browser versus what the asset group resource name is that is being pulled in from the API.

Here's the query I'm using to gather the listing group status, or "type_" :

query = f"""
        SELECT    
            asset_group.name,
            asset_group.resource_name,
            asset_group_listing_group_filter.resource_name,
            asset_group_listing_group_filter.type
        FROM asset_group_product_group_view
        WHERE campaign.id = {campaign_id}
        AND asset_group_listing_group_filter.case_value.product_item_id.value = '{product_id}'
        AND asset_group.resource_name NOT IN ('{resource_name}')
        LIMIT 1
        """        

The response from this query is the following:

SearchPager<results {
  asset_group_listing_group_filter {
    resource_name: "customers/9084369246/assetGroupListingGroupFilters/6476690481~11178916796"
    type_: UNIT_INCLUDED
  }
  asset_group_product_group_view {
    resource_name: "customers/9084369246/assetGroupProductGroupViews/6476690481~11178916796"
  }
  asset_group {
    resource_name: "customers/9084369246/assetGroups/6476690481"
    name: "MDR"
  }
}
field_mask {
  paths: "asset_group.name"
  paths: "asset_group.resource_name"
  paths: "asset_group_listing_group_filter.resource_name"
  paths: "asset_group_listing_group_filter.type"
}
>

As you can see in the type_ field, the status says "UNIT_INCLUDED". However, when I check the browser, this listing group, within this particular campaign and asset group, shows that it is actually excluded. I understand my query is excluding an asset group, but that's on purpose. I'm pulling metrics for this listing group via the API, and the metrics match the browser exactly, but for some reason the status does not match. 

One weird finding is that the asset group resource name listed above in the response, shows that the asset group ID should be "6476690481", and the entire asset group resource name is "customers/9084369246/assetGroups/6476690481". Within the browser, the asset group ID does not match what was provided in the response (see photo for the MDR asset group). In fact, we have no asset group ID that is "6476690481" within our entire account. 

Any ideas why this might be happening? Why do the metrics match exactly, but the status does not match what is showing in the browser? I understand the data can lag a bit, but no changes have been made in the browser, and I've checked again over a period of several days. 


Screenshot 2024-02-27 at 1.55.19 PM.png
Screenshot 2024-02-27 at 1.53.33 PM.png

Google Ads API Forum Advisor

unread,
Feb 28, 2024, 11:29:31 AM2/28/24
to rhomm...@mindgruve.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your query, I understand that you are trying to fetch the status of a listing group from our PMax campaign, but the status does not match what is showing in the browser.

In the provided logs, I could see that you have not provided the campaign_id, product_id and resource_name in the query. Kindly resend the campaign_id, product_id and resource_name. Also, kindly provide us with an uncropped Google Ads account (UI) screenshot of the fields that you are trying to compare with the API with a visible customer ID.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02rzViA:ref"

Thanks,
 
Google Logo Google Ads API Team


Reid Hommedahl

unread,
Mar 4, 2024, 12:53:00 AM3/4/24
to Google Ads API and AdWords API Forum
Hi there, 

Sure thing. The campaign_id, product_id, and resource_name are fetched within a separate query. 

campaign_id = 20520625833
product_id = wh1000xm4/b
asset_group.resource_name = "customers/9084369246/assetGroups/6476690481"

Please see attached screenshots of the asset group page and the listing group that is listed as inactive. 

Thank you for the help.
Reid
Screenshot 2024-03-01 at 11.50.19 AM.png
Screenshot 2024-03-01 at 11.49.50 AM.png

Google Ads API Forum Advisor

unread,
Mar 4, 2024, 9:07:35 AM3/4/24
to rhomm...@mindgruve.com, adwor...@googlegroups.com
Hi Reid,

Thank you for getting back to us.

Kindly note that we are able to retrieve the type as 'UNIT_EXCLUDED' for the asset group ID '6480676138' via the Google Ads API. I would suggest you to try the below query :
 
{
  "query": "SELECT asset_group.name, asset_group.resource_name, asset_group_listing_group_filter.resource_name, asset_group_listing_group_filter.type, campaign.id, asset_group.status FROM asset_group_product_group_view WHERE campaign.id = '20520625833' AND asset_group_listing_group_filter.case_value.product_item_id.value = 'wh1000xm4/b' AND asset_group_listing_group_filter.type = 'UNIT_EXCLUDED'"
}
Also, you can use Query Builder to create your query and Query Validator to validate your query. Also,kindly try making the request to the search or searchStream endpoint to retrieve the results. 

Reid Hommedahl

unread,
Mar 8, 2024, 9:48:55 AM3/8/24
to Google Ads API and AdWords API Forum
Hi there, 

Thanks for the response! 

I added the asset_group.status to the AND part of the query, and it started to work. It seems like it was pulling in an asset group with status "Removed" before, and that's why the asset group IDs didn't match, along with the listing group status that was showing in the browser.

Here was the new response:
SearchPager<results {
  asset_group_listing_group_filter {
    resource_name: "customers/9084369246/assetGroupListingGroupFilters/6476687670~11192855075"
    type_: UNIT_INCLUDED
  }
  asset_group_product_group_view {
    resource_name: "customers/9084369246/assetGroupProductGroupViews/6476687670~11192855075"
  }
  asset_group {
    resource_name: "customers/9084369246/assetGroups/6476687670"
    name: "MDR"
    status: ENABLED
  }
  campaign {
    resource_name: "customers/9084369246/campaigns/20510025794"
    id: 20510025794

  }
}
field_mask {
  paths: "asset_group.name"
  paths: "asset_group.resource_name"
  paths: "asset_group_listing_group_filter.resource_name"
  paths: "asset_group_listing_group_filter.type"
  paths: "campaign.id"
  paths: "asset_group.status"
}
>

SELECT
asset_group.resource_name,
asset_group_listing_group_filter.resource_name,
asset_group_listing_group_filter.type,
asset_group.status
FROM asset_group_product_group_view
WHERE campaign.id = {campaign_id}
AND asset_group.status = 'ENABLED'
AND asset_group_listing_group_filter.case_value.product_item_id.value = '{product_id}'
AND asset_group.resource_name NOT IN ('{resource_name}')
LIMIT 1

Google Ads API Forum Advisor

unread,
Mar 8, 2024, 3:13:47 PM3/8/24
to rhomm...@mindgruve.com, adwor...@googlegroups.com
Hi,


Thank you for getting back to us.

That's great to hear that your issue has been resolved. Do reach out to the Google Ads API support team for any queries related to the API.
Reply all
Reply to author
Forward
0 new messages