All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
loki_themesupport - Update TUTORIAL.md to remove GA4 Measurement ID
- Update gtm-example.json
- Update measurementIdOverride value in JSON
- Add check for
allowed_eventslength in script-pusher
- Prevent JS errors even though parent ID will skip click tracking
- Other GitHub Action for PHPStan
- Allow dataLayerMapping DI type in all data mappers
- Explain DI types in README
- Fix view-cart event again
- Allow for DI config of
Yireo\GoogleTagManager2\Config\Source\ProductAttributes
- Fix typo of wrong setting of $product as category
- Do not add products in event if category display mode does not show products @samicoman #266
- Make sure to trigger
view_cartwhen collapsing minicart - Make sure cart item price includes discount; Add discount,
price_excl_taxandprice_incl_tax - Cart total should include discount
- Re-add
payment_methodnot to break anything - Rename
payment_methodtopayment_typeproperty #283 - Missing value & currency in
remove_from_cartevent #285 - Move logout event to onload event via XML layout handle
customer_account_logoutsuccess - Rename virtual logger to prevent DI code generation notice
- Fixes some more wrong escaping methods being used in frontend files.
- Update AddDataToCustomerSection.php
- Add more product click selectors for Hyvä
- Fix wrong encoding
- Allow CSP frame-src from googletagmanager.com
- Move Hyva Checkout compat into separate package
- Do not use custom product provider by default anymore
- PHP 8.4 compatibility issues
- Issue with js minify, script not loaded #269 @taoufiqaitali
- Fix type error when event name is empty #259
- Make sure to apply Container URL to IFRAME URL as well #267 @rikwillems
- Subtract shipping discount amount from shipping amount #248
- Subtract discount amount from subtotal
- Add payment method to order data #258 @sprankhub
- Fix issue with multiple GTM IDs #257 @taoufiqaitali
- Avoid calling function twice, data already exist #254 @taoufiqaitali
- Use price with currency instead base price #253 @florinm8
- Re-enable product details in category view #250
- Move
Model/Config/classes toConfig/ - Add
Fundinglabel to backend configuration
- Change default
category_productsto 100 because it makes more sense - Change default
view_cart_on_mini_cart_expand_onlyto 1 because it makes more sense
- Only trigger
view_cartevent when there are items in the cart - Allow multiple GTM IDs
- Fix GTM URL
- Add new order state to
order_states_for_purchase_eventdefault - New setting
googletagmanager2/settings/serverside_enabled - Only custom order states for
purchasewhen Server-Side Tracking is enabled
- Fix Uncaught TypeError: products.forEach is not a function #246 @nahall
- Allow configuring which order states should lead to
purchaseevent
- Only clean dataLayer.ecommerce, if new push actually contains ecommerce data
- Move CSP logic to external module
Yireo_CspUtilities
- Revert back to hard-coded proxy #242
- Guarantee
subtotalis always float
- Prevent
add_to_cartfrom firing twice #236 @henk-hypershop @MaximGns - Changed reported value from
grand_totaltosubtotalin various events #240 - Use current category as
item_list_nameparameter #234 @marcinfr - Only trigger
purchaseevent when order is not canceled #227
- Extend from SecureHtmlRenderer\Proxy to delay the instantiation #239 @hostep
- Type Error in class AddCspInlineScripts with the Hyva Checkout #237
- Added $secureRenderer, so CSP compliance #231 @jemoon @hostep @nige-one
- Added compatibility with older versions without SecureHtmlRenderer class
- Remove translation with empty strings #228
- Added customer address data to enhanced conversions #226 @JuulGr
- Remove page layout directive from Hyva checkout
- Compat Magento latest with psr/log
- Lazyload non-event (non-GA4) data from localStorage in Hyva #213
- Make sure
valueof eventpurchaseis without tax and shipping
- Require array return type for merge tags
- Create separate EnhancedConversions tag class
- Implement
ArgumentInterfacefor Magewire dummy component class @wahidnory #223
- Add return to TriggerViewSearchResultDataLayerEvent plugin #214
hyva_checkout_index_index.xmlis loaded without having the hyva checkout enabled #218- Fix restriction cookies with multiple website IDs #217 @jemoon
- Fix PHP errors
- Better error handling in CategoryProvider #209 @thomas-kl1
- Strange issue with empty config causing issues #210 @shwetawawale
- Fix integration test
- Fix potential issues with products only in Root Category
- Fix warnings when a product has no categories
- Fix DI compilation due to 3.7.6
- Refactor loading performance of product data and category data in cart
- Make sure that
customersection in localstorage is refreshed withwishlist/index/add
- Fix PHP 7.4 compat issues
- Livewire: Multiple root elements detected
- Improve loading of shipping method (so
add_shipping_infoevent)
- Fix error when removing cart item #201
- Hyva Checkout support (@hans-vereyken)
- Make sure to use
gtm-checkoutin the checkout, not customerDatacart
- Prevent addShippingInfo from triggering an error in integration API #195 @rhoerr
- Fix login event fired on every pages Hyva #193
- Fix inconsistent price/value formatting #187
- Allowed pages are not always picked up properly #182 (@gaeldelmer)
- Properly implement
allowed_pagesin Hyva scripts - Make sure
minicart_collapseis only there if cart event is allowed everywhere Fatal error: Uncaught Error: Call to a member function getCarrierCode(#192 @WGenie @bvmax)
currencyshould never be part of anitem#189- Do not load category products if disabled #190 (@sprankhub)
- New event
sign_up#185 (@samicoman)
- Fix position of value and currency in
add_to_cart#186 (@anvanza)
- Use correct ID reference with product clicks on PLP pages
- Again prevent JS error
Cannot read properties of undefinedunder Hyva #181
- Prevent JS error
Cannot read properties of undefinedunder Hyva #181
- Make sure that shipment code is added, if missing in address
- Doublecheck for empty events
- Dont bother adding an event if it is empty
- Argument name
productPathshould beproduct_path#179 @meminuygur
- JS error flooding error console (#178 @WouterSteen)
DataLayer/Tag/EnhancedConversions/Sha256EmailAddress.phpbreaks in PHP 7.4 @koentjeh
- Make sure undefined
YIREO_GOOGLETAGMANAGER2_DEBUG_CLICKSdoes not cause issues
- Automagically add an index to every product being mapped #169
- Support For Enhanced Conversions (@sprankhub)
- Fix issue with uninitialized
eventDatacaused by 3.4.4
- Fixed stepNavigator issue in non-default checkout
- Mixins are still active even when enabled = false
- Prevent add-to-cart to trigger view-cart, when view-cart is on cart-page only
- Missing Quantity Parameter in
add_to_cartEvent
- Non-visible child products in bundle cause Fatal Exception
- Option to delay loading GTM until user interaction is triggered
- Fix issue with JS
btoaand non-Latin1 characters #162 @amjadm61
- Emergency fix for
number_format(3 args instead of 4) under PHP 7.4
- Guarantee that cart value is always returned with 4 decimals
- Prevent duplicate events with same data
- Make sure to return data if categories cause exception #160
- Make sure non-cacheable events are wiped from Hyva localstorage
- Don't add categories that are added to another Root Category
parent()might cause issues with nesting HTML #157 @koentjeh- Only point
item_idtowards product ID and add a neworder_item_id - Make logging with colors more consistant
- Rename
purchaseevent topurchase_eventto comply to module standard - Combine notice log with push log
- Add filename for better debugging
- #158 fix payment trigger for guest user #159 @koentjeh
- Add
view_search_resultevent #156 @gaeldelmer
- Make sure no-such-entity-exception doesnt break production
- Make sure to filter categories by
entity_idANDis_active
- Make sure
quantityis afloatnot anint - Alt approach for bypassing non-active categories
- New
etc/data_layer.xmlto extend on global level (instead of using XML layout)
- Categories of product should be enabled to be displayed
- Rewrite splat into
array_mergebecause of PHP 7.4 (#152) - Add log to
CustomerSessionDataProvider(@gaeldelmer) - Execute
begin_checkoutevent using checkout step navigator (@koentjeh #148)
- Triggering shipping and payment events on the spot, instead of delayed
- Adding customData section
gtm-checkoutfor reloading things in checkout
- Option for custom URL for
gtm.jsicw server-side analytics (@WouterSteen)
- Option to trigger
view_cartevent only when expanding minicart
- Support any method in any entity with
GetAttributeValue - GA4 container ID client-side validation #142 @koentjeh
- Fixed default
product_pathconfig for product clicks
- Option to only generate
view_carton the cart page - Move product clicks to separate template and make
productPathconfigurable through layout
- Product category information in data layer is incomplete #138 @DuckThom
- Return price in the current currency for multi-currency stores #127 @samicoman
- Reset ecommerce
dataLayereverywhere - Use
window.dataLayerinstead ofdataLayer
- Add currency and value to
view_cartevent
- Fix undeclared
$scopeConfigin PHP 8.2
- Add additional
magento_skuandmagento_idto products
- Fix Invisible Cart Items #131 (@stijntrinos)
- Better fix for product edit pages
- Cast prices to float in orders and order items #133 (@lfolco)
- Also support product edit pages
- Optimise GetProductsFromCategoryBlockPlugin #135
- Prevent unknown
$htmlargument in plugin to cause Fatal Error, not reported here, not duplicated
- Use tax config for prices in cart/order events #129 (@samicoman)
- Return prices as numbers instead of strings #128 (@samicoman)
- Make sure array does not get converted to string #125
- Removed duplicate IFRAME #126 (@elioermini)
- Use
Magento\Checkout\Model\Cartinstead ofCartInterface#122
- Use core method instead of custom filter #123 (@sprankhub)
- Prevent duplication of items in the
view_item_listevent #119 (@samicoman)
- Prevent TypeError with final price #120
- Fix purchase event
- Prevent duplication of items in the purchase event when configurable product were ordered (@samicoman)
- Prevent failure when no eav attribute set in the config #117 (@samicoman)
- Use
skuinstead ofidasitem_id#114 (@samicoman) - Properly format product price #114 (@samicoman)
- Add categories per product #114 (@samicoman)
- Make sure to calculate value with right price in cart events #115 (@samicoman)
- Handle configurable products in purchase event #116 (@samicoman)
- Prevent reloading order per order-item
- Render debugging block only if available
- Finalize product clicks for Hyva
- Fix typo in payment validator
- Hyva event handling
- Basic compatibility with Hyva
- Backend model prevents saving container ID
- GA4 support
- Removed GA4/UA/EE support
- Extensibility via XML layout
- Support for EAV attributes of products and categories
- Click events
- Cart & checkout events
- Integration Tests
- Update ecommerce attributes #95 (@BorisovskiP)
- Prevent adding quote data to success page #91
- Add additional field for ecommerce push #93 (@sprankhub)
- Prevent adding quote data to success page #91
- Add additional field for ecommerce push #93 (@sprankhub)
- Prevent adding quote data to success page #91
- Add additional field for ecommerce push #93 (@sprankhub)
- Add ecommerce push on checkout success #90 (@sprankhub)
- Fix Duplicate Product Tracking #88 (@sprankhub)
- Add parent SKU #89 (@sprankhub)
Fix duplicate product loading #85 (@sprankhub)
- Prevent Fatal Error with
Amasty_Xlanding
- Fix error on cart configure page (@Irinina)
- Make sure \Yireo\GoogleTagManager2\ViewModel\Product::getProductPrice() always returns float
- Various styling issues (PHPCS, PHPStan)
- Increase framework requirement to 101.2 because of ViewModel bug
- Enabled debugging in JS (dumping attributes and config)
- New Attributes ViewModel to collect data after initialize output
- Add API interfaces to guarantee backwards compatibility in future
- Added XML layout container
gooogletagmanager_containerfor most datalayer blocks - Added debug utility class
- Renamed existing plugin interceptors
- Rewrite x-magento-init into simple require() for performance
- Refactored
Categoryblock to no longer depend ononLoadedProductCollection - Removed all block classes (
Script,Category,Product,Generic,Custom) - Remove
\Yireo\GoogleTagManager2\Util\GetCurrentProduct - Remove
\Yireo\GoogleTagManager2\Util\GetCurrentCategory - Remove helper
- Remove container model
- Remove entire observer-based input method
- Remove ViewModelFactory
Re-add CSP whitelisting
- Fix block retrieval with Layout instead LayoutFactory (@sprankhub)
- Make sure view model is set correctly (@sprankhub)
- Fix error when block is not present
- Category Sort By not working properly with 2.4.X because of weird product loading (70)
- Refactored legacy Registry into request
- Move Config class to new namespace
- PHPCS fixes for Magento Marketplace compliance
- Magento 2.4 support
- Legacy CustomerData class
- Dev dependency with Mockery
- Upgrade PHPUnit to be 2.4 compatible
- Bumped minimum PHP to 7.2
- Add a new CSP whitelist for M2.3.5+
- Some small code quality things
- Add ACL file for configuring access to config
- Major rewrite to remove custom sections in favor of DI plugin
- No more reloading of sections
- Use currency code instead of currency symbol (@nicolas-medina)
- Move cookie-restriction-mode to JS to work with FPC
- Fix duplicate code
- Add compatibility with Magento 2.2 again (2.1 is dropped permanently)
- Fix invalid template path
- Fix reloading issues with quote
- First release with Changelog
- See GitHub commits for earlier messages