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

Integrate Wonder Push Abandoned Cart Reminder 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 extension.

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();

    window.WonderPush = window.WonderPush || [];
    WonderPush.push(function() {
     
      var message = null; // Optional: adapt if you wish to customize the notification text

      var items = product.getAddedToCartItems();

      items.forEach(function(item) {
        WonderPush.putProperties({
          string_cartReminderProductName: item.name,
          string_cartReminderPictureUrl: item.image_url,   
          string_cartReminderMessage: message,
          string_cartReminderUrl: item.url,
        });
      }
    });

});
</script>
Related

Related Extensions

Get more from your Magento2 store!

Enhanced Transactional Emails

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

Catalog Hover Image for Magento

Quickly previewing alternative product images on your category list page.

Enhanced Success Page

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