Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMax Listing Group Status and Asset Group ID Discrepancy #843

Closed
rdhmdhl opened this issue Feb 27, 2024 · 2 comments
Closed

PMax Listing Group Status and Asset Group ID Discrepancy #843

rdhmdhl opened this issue Feb 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working triage New issue; requires attention

Comments

@rdhmdhl
Copy link

rdhmdhl commented Feb 27, 2024

After making a request for a listing group status (included or excluded), the response is "UNIT_INCLUDED", but the specific listing group is actually excluded within the browser. Additionally, the asset group ID found in the asset_group.resource_name field, does not match the browser either. The odd piece here is that the metrics pulled in from the API (spend, clicks, ect.) match exactly to what is in the browser.

Here's the query I am using to pull in the listing group status and asset group resource name:

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
"""

and here is the response:

SearchPager<results {
asset_group_listing_group_filter {
resource_name: "customers/9*********/assetGroupListingGroupFilters/647669048111178916796"
type_: UNIT_INCLUDED
}
asset_group_product_group_view {
resource_name: "customers/9*********/assetGroupProductGroupViews/6476690481
11178916796"
}
asset_group {
resource_name: "customers/9*********/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"
}

I expected to see the asset_group_listing_group_filter.type_ to match the browser, as "UNIT_EXCLUDED". Additionally, I expected the asset_group.resource_name "customers/9*********/assetGroups/6476690481", to contain an ID at the end that matches the ID of this specific asset group shown in the browser (6480676138).

I understand that in my query I am excluding an asset group, that is intentional. Within the browser, the listing group is not included within any asset group. Yet, the API is showing the status as included.

Please see attached photos of the listing group status and asset group ID shown in the browser:
Screenshot 2024-02-27 at 2 36 38 PM
Screenshot 2024-02-27 at 1 55 19 PM

Dependencies:
boto3==1.28.63
botocore==1.31.63
cachetools==5.3.1
certifi==2023.7.22
charset-normalizer==3.3.0
google-ads==22.0.0
google-api-core==2.12.0
google-auth==2.23.3
google-auth-oauthlib==1.1.0
googleapis-common-protos==1.61.0
grpcio==1.59.0
grpcio-status==1.59.0
idna==3.4
jmespath==1.0.1
oauthlib==3.2.2
proto-plus==1.22.3
protobuf==4.24.4
pyasn1==0.5.0
pyasn1-modules==0.3.0
python-dateutil==2.8.2
python-dotenv==1.0.0
PyYAML==6.0.1
requests==2.31.0
requests-oauthlib==1.3.1
rsa==4.9
s3transfer==0.7.0
six==1.16.0
urllib3==2.0.6

@rdhmdhl rdhmdhl added bug Something isn't working triage New issue; requires attention labels Feb 27, 2024
@rdhmdhl
Copy link
Author

rdhmdhl commented Mar 7, 2024

I've observed that when I include the asset_group.status field in the AND clause of the query, it accurately selects the intended asset group, as evidenced by the correct asset group ID being returned in the response. Subsequently, this adjustment also results in the accurate representation of the listing group status.

Prior to incorporating the asset_group.status into the AND clause, the query was erroneously retrieving an asset group marked as "Removed". Despite this, the listing group associated with this incorrect asset group displayed metrics identical to those visible in the browser interface.

Could anyone shed light on why the query behaves differently without specifying the asset_group.status in the AND clause? Is this expected behavior, or might it indicate a potential issue with how the query filters based on the status field? Removed asset groups are not viewable within the browser UI.

Here's the new 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 = {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

@BenRKarl
Copy link
Contributor

Hi @rdhmdhl - this looks like an issue with the API itself and not this library. I recommend reaching out to our API support channel here

@BenRKarl BenRKarl self-assigned this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issue; requires attention
Projects
None yet
Development

No branches or pull requests

2 participants