From 2370630ef1b2afe627b6f42e41928d814ebe1866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?= Date: Tue, 13 May 2025 13:33:54 -0300 Subject: [PATCH] fix --- superpage/src/pages/_components/BuyButton.astro | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/superpage/src/pages/_components/BuyButton.astro b/superpage/src/pages/_components/BuyButton.astro index b193eee..89c32d2 100644 --- a/superpage/src/pages/_components/BuyButton.astro +++ b/superpage/src/pages/_components/BuyButton.astro @@ -86,6 +86,23 @@ const currency = new Intl.NumberFormat("pt-BR", { }, }); + // window.dataLayer = window.dataLayer || []; + // function gtag(...args: any[]) { + // window.dataLayer.push(args); + // } + // gtag("event", "add_to_cart", { + // currency: "BRL", + // value: parseFloat(unit_price), + // items: [ + // { + // item_id: id, + // item_name: name, + // price: parseFloat(unit_price), + // quantity: 1, + // }, + // ], + // }); + const r = await checkout(item); const json = await r.json();