Docs

Analytics and cart events

1 min readUpdated November 29, 2026

Your analytics see what happens in the mini cart and on the cart page. Removing items, changing quantities and opening the mini cart send the events these plugins expect:

  • GTM4WP
  • PixelYourSite
  • Google Analytics for WooCommerce
  • Google for WooCommerce
  • Meta for WooCommerce

Turn it on or off#

Integrations tab: Send cart events from the mini cart and cart. On by default.

A small script (under 3 KB) loads with the mini cart and on the cart page only while one of these plugins is active.

Begin checkout is left to the checkout page, which these plugins already track, so it isn’t counted twice.

Any other tool#

Every event also fires nbwt_track on document.body:

document.body.addEventListener( 'nbwt_track', function ( e ) {
	// e.detail.type: 'add', 'remove' or 'view'
	// e.detail.item: id, name, price, quantity and more
} );

For developers#

  • nbwt_trackers adds a tracking plugin.
  • nbwt_track_item changes the item data sent with each event (id, product id, SKU, name, unit price, quantity, cart item key, category, variant).