🐛 (pixel) Fix event tracking
Did not work when specifying the pixel ID for each track function
This commit is contained in:
@ -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",
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user