diff --git a/src/utils/functions/shop.ts b/src/utils/functions/shop.ts index 86c63fb..653d913 100644 --- a/src/utils/functions/shop.ts +++ b/src/utils/functions/shop.ts @@ -1,6 +1,7 @@ import swell from 'swell-js' import { addNotification } from '$utils/functions/notifications' import { cartData } from '$utils/stores/shop' +import { sendEvent } from '$utils/analytics' import { PUBLIC_SWELL_STORE_ID, PUBLIC_SWELL_API_PUBLIC_TOKEN } from '$env/static/public' @@ -40,6 +41,11 @@ export const addToCart = async (product: any, quantity: number = 1) => { name: `${product.name} - x1`, image: product.images[0].file.url, }) + + // Send event + sendEvent('addToCart', { + product: product.name + }) } }