Login to your Google Tag Manager account. Follow the Google instructions to create a new Google Tag Manager container. Extract the Container Public ID from your new container. Configure your new ID in Magento through System > Configuration > [Services] Google Tag Manager.
The extension has the following configuration options:
- Enabled: When this is set to No, the extension does not work.
- Container Public ID: The ID of your Google Tags container
- Insertion Method: A technical thing which is either set to Observer or to XML Layout. If the one does not work for you, try the other one instead.
- Debug: For developers.
This extension adds the following attributes automatically to the data layer. There is no backend option to tune this, so if you want to make changes, change the PHTML templates in your own theme.
customerLoggedIn
= Whether the customer has logged incustomerId
= ID of the customercustomerGroupId
= Customer group IDcustomerGroupCode
= Customer group codecategoryId
= Category IDcategoryName
= Category namecategoryProducts
= Listing of top 3 productsproductId
= Product IDproductName
= Product nameproductSku
= Product SKUproductPrice
= Product pricetransactionId
= Order IDtransactionDate
= Order datetransactionAffiliation
= Website nametransactionTotal
= Order totaltransactionTax
= Order taxtransactionShipping
= Shipping amounttransactionPayment
= Payment methodtransactionCurrency
= Currency of websitetransactionPromoCode
= Promotional code used for ordertransactionProducts
= Listing of all items in cartsku
= Item SKUname
= Item nameprice
= Item pricecategory
= Listing of category IDsquantity
= Item quantity
Note that on a product page with an URL that also identifies a category, both the product attributes and the category attributes are added.
This module does not use XML rewrites to change core classes. It uses two insertion modes - one using the XML layout, one using an observed event core_block_abstract_to_html_after
.
When you want to track conversions in your Magento checkout, our extension helps out as well: It adds the relevant information to all your checkout and cart pages. Do you want to know which variables are on the success page? Use the Yireo CheckoutTester extension to preview that page and view its HTML source.
Bring your towel.