The Added Product event must be pushed to the digitalData.events array when a user adds a product to their cart or increases the quantity of a product in the cart.

Important! The event should not be added after clicking on the “Add to Cart” button, but after the server returns a signal about the successful addition of the product to the cart.

From the site code / when using AJAX

digitalData.events.push({
  name: 'Added Product',
  product: {...},
  quantity: 1
});

For a detailed description of the product object, see the developer section.

From the DDManager interface

If you are sure that the product will be added to the user’s cart by clicking on the “Add to Cart” button, you can use the following event settings:

Trigger: click,

CSS selector: .your_add_button_class,.your_increment_button_class,

Event handler:

return {
  name: 'Added Product',
  category: 'Ecommerce',
  product: _digitalData('product'),
  quantity: 1
};

Required by the following integrations:

  • Facebook
  • Retail Rocket
  • Segmento
  • Yandex.Metrica
  • Google Analytics (Enhanced Ecommerce)