2
0

🐛 (pixel) Fix event tracking

Did not work when specifying the pixel ID for each track function
This commit is contained in:
Baptiste Arnaud
2023-07-16 18:54:36 +02:00
parent 3426d6689d
commit 7d62c7ac85
4 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/js",
"version": "0.1.1",
"version": "0.1.2",
"description": "Javascript library to display typebots on your website",
"type": "module",
"main": "dist/index.js",

View File

@ -2,7 +2,6 @@ import { PixelBlock } from '@typebot.io/schemas'
declare const window: {
fbq?: (
arg0: string,
arg1: string,
arg2: string,
arg3: Record<string, string> | undefined
@ -42,7 +41,7 @@ export const trackPixelEvent = (options: PixelBlock['options']) => {
: undefined
if (options.eventType === 'Custom') {
if (!options.name) return
window.fbq('trackCustom', options.pixelId, options.name, params)
window.fbq('trackCustom', options.name, params)
}
window.fbq('track', options.pixelId, options.eventType, params)
window.fbq('track', options.eventType, params)
}

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/nextjs",
"version": "0.1.1",
"version": "0.1.2",
"description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -1,6 +1,6 @@
{
"name": "@typebot.io/react",
"version": "0.1.1",
"version": "0.1.2",
"description": "Convenient library to display typebots on your Next.js website",
"main": "dist/index.js",
"types": "dist/index.d.ts",