DataLayer for Google Tag Manager
How To Configure
DataLayer for Google Tag Manager

Integrate BounceX with Google Tag Manager

Please Note: The settings below require our Datalayer for Google Tag Manager for Magento and some features also require our Enhanced Ecommerce or Google Analytics 4 extensions.

Tag Configuration
  Tag type : Custom Html

Trigger Configuration
  Trigger: All Custom Events
  Event Name : purchase


require(['DataLayerPurchaseApi'], function (dataLayerPurchaseApi) {
    var purchase = dataLayerPurchaseApi();
    var bouncexFormat = {
        renameFieldTo: {id: 'sku', product_id: 'product_id' quantity: 'quantity', price: 'price'}
    var bouncexItems = purchase.getItems(bouncexFormat);
    <!-- Start BounceX Conversion MultiPixel. Deploy at the beginning of document head. -->
    top.bouncex = top.bouncex || [];
    top.bouncex.push(["conversion", {
        "order_id": purchase.getOrderId(),
        "email": purchase.getEmail(),
        "transaction_origin": "website",
        "currency": purchase.getCurrencyCode(),
        "coupon": purchase.getOrder('coupon').split(','),
    <!-- End BounceX Conversion MultiPixel. -->
    var queryParms = {
        website_id: 'Add your Container Tag Id here',
        order_id: purchase.getOrderId(),
        email: purchase.getEmail(),
        amount: purchase.getOrderTotal(),
        goal: 'purchase'
    var url = purchase.buildUrl();

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.

Enhanced Success Page

Add cross-sell, upsell, related products, social media links and other elements to your order confirmation.

Order Shipment Tracking

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