From eaee3cf33da3400e70833c5b83cab1030342eb38 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sat, 30 Nov 2024 12:25:27 +0100 Subject: [PATCH] testing pixel code --- src/routes/pricing/+page.svelte | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/routes/pricing/+page.svelte b/src/routes/pricing/+page.svelte index b1352623..f18fbc8b 100644 --- a/src/routes/pricing/+page.svelte +++ b/src/routes/pricing/+page.svelte @@ -41,15 +41,24 @@ async function purchasePlan(subscriptionType: string = "") { if (data?.user) { let subId = ""; - + let value = 0; if (subscriptionType === "lifeTime") { subId = import.meta.env.VITE_LEMON_SQUEEZY_LIFE_TIME_ACCESS_ID; + value = 599; } else if (mode) { subId = import.meta.env.VITE_LEMON_SQUEEZY_ANNUAL_ID; + value = 59.88; } else { subId = import.meta.env.VITE_LEMON_SQUEEZY_MONTHLY_ID; + value = 9.99; } + twq("event", "tw-onuuu-ospg6", { + value: value, + currency: "USD", + conversion_id: data?.user?.id, + }); + const isDarkMode = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches; @@ -104,6 +113,24 @@ window.lemonSqueezyAffiliateConfig = { store: "stocknear" }; + +