Google Tag Manager allows you to quickly and easily add or update AdWords, Google Analytics, Facebook Tags and other code snippets on your website without edit to your magento 2 codebase.
- Quick and easy setup
- Add tag via XML layout and/or observer
- Data layer support
- Download the extension
- Unzip the file
- Create a folder {Magento 2 root}/app/code/MagePal/GoogleTagManager
- Copy the content from the unzip folder
composer require magepal/magento2-googletagmanager
php -f bin/magento module:enable --clear-static-content MagePal_GoogleTagManager
php -f bin/magento setup:upgrade
Log into your Magetno 2 Admin, then goto Stores -> Configuration -> MagePal -> Google Tag Manager and enter your GTM account credentials
- pageType (i.e catalog_category_view)
- list (cart, category, detail, other)
- customer.isLoggedIn
- customer.id
- customer.groupId
- category.id
- category.name
- category.path
- product.id
- product.name
- product.sku
- product.path
- cart.hasItems
- cart.items[].sku
- cart.items[].name
- cart.items[].price
- cart.items[].quantity
- cart.total
- cart.itemCount
- cart.itemQty
- cart.hasCoupons
- cart.couponCode
- transactionId
- transactionAffiliation
- transactionTotal
- transactionShipping
- transactionTax
- transactionCouponCode
- transactionDiscount
- transactionSubTotal
- transactionProducts[].sku
- transactionProducts[].name
- transactionProducts[].price
- transactionProducts[].quantity