Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Track subscribe start checkout

Blue Mouseec59b46fff6a
diff --git a/web/app/pages/Subscribe/Subscribe.tsx b/web/app/pages/Subscribe/Subscribe.tsx
index 3aa027b16..5d77d9c3a 100644
--- a/web/app/pages/Subscribe/Subscribe.tsx
+++ b/web/app/pages/Subscribe/Subscribe.tsx
@@ -29,6 +29,7 @@ import { Text } from '~/ui/Text'
import { Switch } from '~/ui/Switch'
import { cn } from '~/utils/generic'
import routes from '~/utils/routes'
+import { track } from 'swetrix'
const INITIAL_VISIBLE_PLANS = 3
const formatEventsLong = (value: number, locale = 'en-US') =>
@@ -142,6 +143,18 @@ const Subscribe = () => {
])
const handleStartCheckout = () => {
+ track({
+ ev: 'SUBSCRIBE_START_CHECKOUT',
+ meta: {
+ plan: selectedPlan,
+ billingFrequency: selectedBillingFrequency,
+ currency: currencyCode,
+ paddleLoadError,
+ isPaddleLoaded,
+ paddleWindowExists: !!(window as any).Paddle,
+ },
+ })
+
if (paddleLoadError) {
toast.error(t('billing.paddleLoadError'))
return