Bug P4
Status Update
Comments
ke...@google.com <ke...@google.com> #2
Hello,
Please check your inbox. I've sent you a separate email to request for more details. Let's continue our discussion on that thread moving forward.
Regards,
Kevin Soriano, Google Analytics API Team
Description
If you have an issue with the Google Analytics UI or product, use the “Send Feedback” action under the ⋮ menu on
The best place to ask questions about using and developing with Google Analytics APIs, libraries, and SDKs is on Stack Overflow. Make sure to use the “google-analytics” or “google-analytics-api” tags.
This is the place to report bugs or feature requests with the Google Analytics API. If that does not describe your use case, please review the other resources available here:
------------ ✂ ------------
Summary: I was trying to retrieve a full list of source level properties, roll-up properties, and sub-properties for a given parenting account using AnalyticsAdmin.Properties.list({filter object}) in a Google Apps script.
I began by using {filter: 'parent:account/{accountId}' } and only got a list of source properties and roll-up properties in the response. I then tried {filter: 'ancestor:account/{accountId}' } which got me the full list, including sub-properties.
To my surprise, sub-properties listed that way contained the account as their parent, e.g.:
{
"name": "properties/{propertyId}",
"parent": "accounts/{accountId}",
"createTime": "2022-09-06T08:27:14.722Z",
"updateTime": "2022-09-06T08:27:14.722Z",
"displayName": "Property Name",
"timeZone": "America/Bogota",
"currencyCode": "COP",
"serviceLevel": "GOOGLE_ANALYTICS_360",
"account": "accounts/{accountId}",
"propertyType": "PROPERTY_TYPE_SUBPROPERTY"
}
I then tried {filter: 'parent:properties/{propertyId}' } to confirm whether source properties are the actual parents of sub-properties – which works as it lists all sub-properties for a given source property.
Expected Behavior: I can see two options here: Either 1) sub-properties are listed via {filter: 'parent:account/{accountId}' } as their parent property maps to the account level OR 2) the parent property of sub-properties is mapped to the source property level making it clear that they have a parent-child relationship.
Steps to Reproduce:
1. List all GA4 properties, roll-up properties and sub-properties of a given account using {filter: 'ancestor:account/{accountId}' }
2. Confirm that the "parent" property for properties with the "propertyType" = "PROPERTY_TYPE_SUBPROPERTY" maps to the account level rather than the source property level ("propertyType" = "PROPERTY_TYPE_ORDINARY").