DataLayer for Google Tag Manager
How To Configure
Purchase Extension

Related Extensions

Get more from your Magento2 store!

DataLayer for Tag Manager

Whether you are integrating Bing, Facebook, SnapChat, Pinterest, or any other services our extension make it easy.

HTML Minifier for Magento2

Minification is the process of removing all unnecessary characters and spacing from your source code without changing its functionality.

Magento Enhanced E-commerce

If your are using Magento + Google Analytics, then you need Enhanced E-commerce for Google Tag Manager.

Integrate Impact with Google Tag Manager

Product Page View
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Page

HTML

<script>
require(['DataLayerCustomerApi'], function (dataLayerCustomerApi) {
    var customer = dataLayerCustomerApi();
    
    var email_hash = customer.getEmailSha1('');
    var customer_id = customer.getId('');
    
    ire('identify', {customerId: customer_id, customerEmail: email_hash});
});
</script>
Purchase
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : purchase

HTML

<script>
require(['DataLayerPurchaseApi'], function (dataLayerPurchaseApi) {
    var purchase = dataLayerPurchaseApi();

    var impactFormat = {
        renameFieldTo: {id:'sku', quantity:'quantity', price:'subTotal', name:'name', category:''},
        appendIndex: false
    };
    
    var trackConversionId = 'Add ID here (eg 174xx)';
      
    ire('trackConversion', trackConversionId, {
    	orderId: purchase.getOrder('order_id'),
    	customerId: purchase.getOrder('customer_id', ''),
    	customerEmail: purchase.getOrder('email_sha1'),
    	customerStatus: "",
    	currencyCode: purchase.getCurrencyCode(),
    	orderDiscount: purchase.getOrder('discount'),
    	orderPromoCode: purchase.getOrder('coupon_code'),
    	items: purchase.getItems(impactFormat)
    }, {verifySiteDefinitionMatch:true});
});
</script>
Related

Related Extensions

Get more from your Magento2 store!

Magento Enhanced E-commerce

If your are using Magento + Google Analytics, then you need Enhanced E-commerce for Google Tag Manager.

Catalog Hover Image for Magento

Quickly previewing alternative product images on your category list page.

Enhanced Transactional Emails

Get more from your order confirmation emails by promoting other complementary products.