Google Tag Manager Enhanced Ecommerce plugin for Sylius eCommerce platform
composer require stefandoorn/google-tag-manager-enhanced-ecommerce-plugin
2. Follow installation instructions of required sub bundle
3. Load bundle
Add to the bundle list in
4. Adjust configurations
Configure the features you would like to use/not. Find a base configuration reference by running:
bin/console config:dump-reference GtmEnhancedEcommercePlugin
5. Install assets
bin/console assets:install bin/console sylius:install:assets bin/console sylius:theme:assets:install
By default all features are enabled.
Each feature has it's own specific documentation.
- purchases: Send purchases to GTM.
- product_impressions: Send impressions on product listings to GTM
- product_detail_impressions: Send impression on product detail pages to GTM
- product_clicks: Send click events on product links to GTM
- cart: Send add to cart / remove from cart events to GTM
- checkout: Send checkout steps & selected options to GTM
Make sure to check that the required 'sonata_block_render_events' template events are available. Check the
src/Resources/config/services.yml for the definitions.
This is only to be checked if you've been overriding templates yourselves.
Features not supported (yet):
It might be that your data resolvers give a performance hit, e.g. on the product show page.
There are decorators available that allow you to cache the results for a set time in order. Take a look
at the service definitions in
cache_services.yml & the default configuration on how to enable this setting.