All Projects → stefandoorn → sylius-google-tag-manager-enhanced-ecommerce-plugin

stefandoorn / sylius-google-tag-manager-enhanced-ecommerce-plugin

Licence: MIT License
Enhanced Ecommerce implementation through Google Tag Manager for Sylius eCommerce Platform

Programming Languages

PHP
23972 projects - #3 most used programming language
javascript
184084 projects - #8 most used programming language
Twig
543 projects
shell
77523 projects

Google Tag Manager Enhanced Ecommerce plugin for Sylius eCommerce platform

License Version Build

Installation

1. Composer

composer require stefandoorn/sylius-google-tag-manager-enhanced-ecommerce-plugin

2. Follow installation instructions of required sub bundle

https://github.com/stefandoorn/google-tag-manager-plugin

3. Load bundle

Add to the bundle list:

new StefanDoorn\SyliusGtmEnhancedEcommercePlugin\SyliusGtmEnhancedEcommercePlugin(),

4. Adjust configurations

Configure the features you would like to use/not. Find a base configuration reference by running:

bin/console config:dump-reference SyliusGtmEnhancedEcommercePlugin

5. Install assets

bin/console assets:install
bin/console sylius:install:assets
bin/console sylius:theme:assets:install

By default all features are enabled.

Features

Each feature has it's own specific documentation.

Make sure to check that the required 'sonata_block_render_events' template events are available. Check the src/Resources/config/features/*.yml & src/Resources/config/services.yml for the definitions.

This is only to be checked if you've been overriding templates yourselves.

Bootstrap a GTM container

You can find a GTM container fully configured that work with the test application in docs/GTM-EXAMPLE.json. This file can be imported to easily configure your container

It will add thoses tags and triggers

You will have to replace the UA-111111111-1 by your own Universal Analytics ID

Features not supported (yet):

Cache Resolvers

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].