DataLayer for Google Tag Manager
How To Configure
Purchase Extension

Related Extensions

Get more from your Magento2 store!

Order Shipment Tracking

Providing your customer with a beautiful and functional order package tracking without leaving your site.

DataLayer for Tag Manager

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

Magento Enhanced E-commerce

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

Integrate Bing UET with Google Tag Manager

Product Page View
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : productPage

HTML

<script>
require(['DataLayerProductApi'], function (dataLayerProductApi) {
    var product = dataLayerProductApi();
    
    <!-- Bing UET Code -->
    window.uetq = window.uetq || []; 
    window.uetq.push('event', '', {
        'ecomm_pagetype': 'product',
        'items': product.getProductCollection(),
        'currency': product.getCurrencyCode()
    });  
    <!-- End Bing UET Code -->
});
</script>
Add To Cart
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : addToCart

HTML

<script>
require(['DataLayerProductApi'], function (dataLayerProductApi) {
    var product = dataLayerProductApi();
        
    <!-- Bing UET Code -->
    window.uetq = window.uetq || []; 
    window.uetq.push('event', 'add_to_cart', {
        'items': product.getAddedToCartItems(),
        'currency': product.getCurrencyCode()
    });  
    <!-- End Bing UET Code -->
});
</script>
Remove From Cart
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : removeFromCart

HTML

<script>
require(['DataLayerProductApi'], function (dataLayerProductApi) {
    var product = dataLayerProductApi();
        
    <!-- Bing UET Code -->
    window.uetq = window.uetq || []; 
    window.uetq.push('event', 'remove_from_cart', {
        'items': product.getRemovedFromCartItems(),
        'currency': product.getCurrencyCode()
    });  
    <!-- End Bing UET Code -->
});
</script>
Initiate Checkout
Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : checkoutPage

HTML

<script>
require(['DataLayerCheckoutApi'], function (dataLayerCheckoutApi) {
    var checkout = dataLayerCheckoutApi();
             
    <!-- Bing UET Code -->
    window.uetq = window.uetq || []; 
    window.uetq.push('event', 'begin_checkout', {
        'items': checkout.getItems(),
        'currency': checkout.getCurrencyCode(),
        'revenue_value': checkout.getCart('total')
    });  
    <!-- End Bing UET Code -->    
});
</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();
    
    <!-- Bing UET Code -->
    window.uetq = window.uetq || []; 
    window.uetq.push ('event', 'purchase', {
        'event_category': 'ecommerce',
        'revenue_value': purchase.getOrder('total'),
        'tax': purchase.getOrder('tax'),
        'shipping': purchase.getOrder('shipping'),
        'coupon': purchase.getOrder('coupon_code'),
        'items': purchase.getItems(),
        'currency': purchase.getCurrencyCode()
    }); 
    <!-- End Bing UET Code --> 
});
</script>
Related

Related Extensions

Get more from your Magento2 store!

Order Shipment Tracking

Providing your customer with a beautiful and functional order package tracking without leaving your site.

HTML Minifier for Magento2

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

DataLayer for Tag Manager

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