Skip to content

Add to cart event not passing values to google analytics dashboard

As We are using Magento PWA Venia setup, we integrated google analytics code to our website manually. After adding the below code , add_to_cart event is firing in Google analytics dashboard. but the values like sku, product_price, are not displaying in dashboard.

Below is Code :

GTMEventTrigger({
  route: window.location.pathname,
  event: gtag("event", "add_to_cart", {
    items: [
      {
        'prid': product.id,
        'name': product?.name,
        'sale_price': product?.price_range?.maximum_price?.final_price.value,
        'price': product?.price_range?.maximum_price?.final_price.value,
      }
    ]
  }),
  title: document.title
}); 

Analytics Dashboard :

enter image description here