kodbruket / magento2-gtm
Google Tag Manager for Magento 2
Installs: 174
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: ~5.6.0|~7.0.0
- magento/framework: *
- magento/module-checkout: *
- magento/module-quote: *
- magento/module-sales: *
- magento/module-tax: *
- magento/zendframework1: *
Requires (Dev)
- magento/marketplace-eqp: *
- phpmd/phpmd: ^2.4
- phpunit/phpunit: ^4.8
- sebastian/phpcpd: ^2.0
- squizlabs/php_codesniffer: ^2.5
This package is not auto-updated.
Last update: 2024-11-09 21:27:23 UTC
README
Installation
The easiest way to install the extension is to use Composer, just run the following commands:
$ composer require kodbruket/magento2-gtm
$ bin/magento module:enable Kodbruket_Gtm
$ bin/magento setup:upgrade
Configuration
Enable the module under Stores / Configuration / Sales / Google API. Enter your container ID from Google Tag Manager and specify whether to use quote or order when tracking the transaction on the success page. When the module is set to track by quote it will try to set transactionID
to the reserved order ID from the quote. If no order ID has been reserved it will fall back to the entity ID of the quote.
The module looks at the full action names catalog_product_index
, catalog_category_index
and checkout_checkout_index
to decide which data to include in the data layer. It's fully possible to add or define other full action names directly from admin. Just set Use custom action names to Yes and define the action names you want it to look at.