-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Enhanced Google Analytics 4 Integration and Ecommerce Tracking Improvements #3305
Conversation
rebasing on main doesn't work but we've to do it :-) PS: thanks for this great new additions! |
Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
someone is a ga4 expert? seems we can't get products revenue by categories, always show category "others" in explore reports or in looker studio, maybe we have to pass the item_category in the purchase events. we have skipped adding it like in universal for performance reason and because we thought that ga4 was able to aggregate the data with item_view and item_view_list where we pass item_category, i dont know if is one of millions of bugs affected by ga4 or it's normal, but if is an important data i can add it. in the future we want to implement caching for item_view and item_view_list events and include all data like item_category1-2-3-4 and manufacturer (if not is used_in_product_listing) |
also because item_category can be ambiguous, if the product is assigned to multiple categories |
To have statistics for each event without aggregating data through BigQuery, it is necessary to pass item_category. So, I have implemented it. |
we have 1green + 2gray, I'd merge if there's nothing more to change |
nice! I think we're ready for rc5! |
$toolbarBlock = Mage::app()->getLayout()->getBlock('product_list_toolbar');
$pageSize = $toolbarBlock->getLimit(); |
/app/code/core/Mage/GoogleAnalytics/Block/Ga.php:273 contains this line $result[] = "gtag('event', 'remove_from_cart', " . json_encode($eventData, JSON_THROW_ON_ERROR) . ");"; Please open a separate issue with a detailed information. |
it's probably from the rc5 version but it's impossible to understand |
If you create a new issue for this, tag me on it. Would like a bit more information about the scenario when you received the logged error. |
Description (*)
Improve Google Analytics 4 integration and ecommerce tracking
PS: Apologies for not splitting into single issues/PRs for better comparison/readability. I've had to refactor multiple parts and am short on time.
New Features
Fixed Issues
Manual testing scenarios (*)
Questions or comments
We have tested it at some production sites, and it's working correctly for us as is.