-
Notifications
You must be signed in to change notification settings - Fork 69
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
Include parent category names to the GA product data. #198
Comments
Adding tag for discussion - It's not clear to me whether the hierarchy is needed or what the implications are - might need to do some diving into their docs. |
This is confirmed, the categories are retrieved (alphabetically) on Line 168 with woocommerce-google-analytics-integration/includes/class-wc-abstract-google-analytics-js.php Lines 165 to 182 in 44e85ea
They're then displayed in a According to the Universal Analytics Enhanced Ecommerce documentation, the categories can and should be shown in hierarchical order:
However, in WooCommerce products can have multiple categories. For example, the hoodie could have the categories Clothing > Hoodies, as well as Fan Gear > Real Madrid, in which case the plugin shows ConclusionReordering the categories by hierarchy would be an improvement, but only for products that are in one category "tree". However, there doesn't seem to be a way to reconcile WooCommerce's multi-category support with the single hierarchical category supported by Google Analytics, so making the changes necessary wouldn't fix the problem for all stores. Is it better for the feature to be consistent (but broken) for all cases, or to work sometimes (but not reliably)? (For reference, Google Analytics 4 still has a hierarchical design, but with a different syntax that isn't currently supported by the plugin AFAICS: https://developers.google.com/analytics/devguides/collection/ga4/ecommerce#view_item) |
Thanks for the investigation @layoutd and clear information. Leaving as an enhancement for product to prioritize at a later point. @WillBrubaker feel free to add to the ideas board to help us gather an idea of customer need. |
4260824-zen
categories being sent to Google are just alphabetized and do not reflect any parent/child structure.
p1630554442116900/1630509117.102700-slack-C7U3Y3VMY
The text was updated successfully, but these errors were encountered: