This commit is contained in:
2025-05-13 12:26:36 -03:00
parent b4a0595869
commit 0f7b39c3cb

View File

@@ -69,8 +69,10 @@ const currency = new Intl.NumberFormat("pt-BR", {
target.disabled = true; target.disabled = true;
window.dataLayer?.push({ ecommerce: null }); // Clear the previous ecommerce object.
window.dataLayer?.push({ window.dataLayer?.push({
event: "add_to_cart", event: "add_to_cart",
ecommerce: {
currency: "BRL", currency: "BRL",
value: parseFloat(unit_price), value: parseFloat(unit_price),
items: [ items: [
@@ -81,6 +83,7 @@ const currency = new Intl.NumberFormat("pt-BR", {
quantity: 1, quantity: 1,
}, },
], ],
},
}); });
const r = await checkout(item); const r = await checkout(item);