{"version":3,"file":"events.2dd70411.js","sources":["../../../../utils/events.ts"],"sourcesContent":["import { LooseObject } from '~/types/generic';\n\nexport const sendUserSignupEvent = (userId: string): void => {\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({ event: 'sign_up', user_id: userId });\n};\n\nexport const sendUserLoginEvent = (userId: string): void => {\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({ event: 'login', user_id: userId });\n};\n\nexport const sendPurchaseEvent = (purchaseEventVars: LooseObject) => {\n window.dataLayer = window.dataLayer || [];\n window.dataLayer.push({ ecommerce: null });\n window.dataLayer.push({\n event: 'purchase',\n ecommerce: {\n ...purchaseEventVars,\n },\n });\n};\n"],"names":["sendUserSignupEvent","userId","sendUserLoginEvent","sendPurchaseEvent","purchaseEventVars"],"mappings":"AAEa,MAAAA,EAAuBC,GAAyB,CACpD,OAAA,UAAY,OAAO,WAAa,CAAA,EACvC,OAAO,UAAU,KAAK,CAAE,MAAO,UAAW,QAASA,EAAQ,CAC7D,EAEaC,EAAsBD,GAAyB,CACnD,OAAA,UAAY,OAAO,WAAa,CAAA,EACvC,OAAO,UAAU,KAAK,CAAE,MAAO,QAAS,QAASA,EAAQ,CAC3D,EAEaE,EAAqBC,GAAmC,CAC5D,OAAA,UAAY,OAAO,WAAa,CAAA,EACvC,OAAO,UAAU,KAAK,CAAE,UAAW,IAAM,CAAA,EACzC,OAAO,UAAU,KAAK,CACpB,MAAO,WACP,UAAW,CACT,GAAGA,CACL,CAAA,CACD,CACH"}