Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5981

False abandoned cart notification

$
0
0

Hello,

I’m using the last version of matomo and i have problems about “ecomerce tracking”.

When a customer add a product i redirect to a page.

I send this information to my matomo

  1. Clear ecomerce
//reset the cart items in Matomo
_paq.push(['clearEcommerceCart']);

2.- loop to include all the products into the cart

//loop through each item to report cart data to Matomo
cartProducts.forEach(function(product) {
    _paq.push(['addEcommerceItem',
    product.productSKU,
    product.productName,
    product.productCategory,
    product.price,
    product.quantity
]);
});

3.- Calculte the total

//calculate the sum total of all cart items
var totalCartValue = cartProducts.reduce(function(total, product) {
    return total + (product.price * product.quantity);
}, 0);

4.- Send all this information to Matomo

//push the cart data to Matomo
_paq.push(['trackEcommerceCartUpdate', totalCartValue]);

I do this every time my cart page loads.

The problem is that i have this information in matomo, always the tracking indicates “abandoned cart” and is not true…

Captura de pantalla 2024-07-19 a las 14.42.56

Can anybody help me?

Thanks in advance.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5981

Trending Articles