testing pixel

This commit is contained in:
MuslemRahimi 2024-12-02 22:26:48 +01:00
parent be59e44bf5
commit 9c2556b1e4
3 changed files with 16 additions and 0 deletions

7
package-lock.json generated
View File

@ -19,6 +19,7 @@
"ua-parser-js": "^1.0.37"
},
"devDependencies": {
"@beyonk/svelte-facebook-pixel": "^3.0.1",
"@internationalized/date": "^3.5.5",
"@playwright/test": "^1.43.1",
"@rollup/plugin-dynamic-import-vars": "^2.1.2",
@ -1319,6 +1320,12 @@
"node": ">=6.9.0"
}
},
"node_modules/@beyonk/svelte-facebook-pixel": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@beyonk/svelte-facebook-pixel/-/svelte-facebook-pixel-3.0.1.tgz",
"integrity": "sha512-jlUI/RYvHnsnBnkt0O0sjLpHqkAqKsHsNniWgzcScr4P5qPXNjos3MUyLJVifONLaPTxzrUSGpt4BWXE/zw77w==",
"dev": true
},
"node_modules/@emnapi/runtime": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.0.tgz",

View File

@ -18,6 +18,7 @@
"test:safari": "npx playwright test --headed --project=safari"
},
"devDependencies": {
"@beyonk/svelte-facebook-pixel": "^3.0.1",
"@internationalized/date": "^3.5.5",
"@playwright/test": "^1.43.1",
"@rollup/plugin-dynamic-import-vars": "^2.1.2",

View File

@ -2,6 +2,7 @@
import { numberOfUnreadNotification } from "$lib/store";
import { openLemonSqueezyUrl } from "$lib/lemonsqueezy";
//import Discount from '$lib/components/Discount.svelte';
import { FacebookPixel, fb } from "@beyonk/svelte-facebook-pixel";
import { onMount } from "svelte";
//import proTierLogo from "$lib/images/pro_tier_logo.png";
@ -58,6 +59,11 @@
currency: "USD",
conversion_id: data?.user?.id,
});
fb.track("Purchase", {
value: value, // Replace with actual purchase value
currency: "USD", // Replace with your currency code
});
} catch (e) {
console.log(e);
}
@ -136,6 +142,8 @@
</script>
</svelte:head>
<FacebookPixel pixels={["1170112523654647"]} />
<section
class="bg-[#09090B] min-h-screen mb-40 w-full max-w-3xl sm:max-w-screen-xl pt-10 m-auto"
>