Add Meta Pixel block

Closes #582
This commit is contained in:
Baptiste Arnaud
2023-06-28 09:52:03 +02:00
parent 92f7f3cbe2
commit 033f8f99dd
39 changed files with 826 additions and 38 deletions

View File

@@ -5,7 +5,5 @@ export const executeGoogleAnalyticsBlock = async (
options: GoogleAnalyticsOptions
) => {
if (!options?.trackingId) return
const { default: initGoogleAnalytics } = await import('@/lib/gtag')
await initGoogleAnalytics(options.trackingId)
sendGaEvent(options)
}

View File

@@ -0,0 +1,8 @@
import { trackPixelEvent } from '@/lib/pixel'
import { isEmpty } from '@typebot.io/lib/utils'
import type { PixelBlock } from '@typebot.io/schemas'
export const executePixel = async (options: PixelBlock['options']) => {
if (isEmpty(options?.pixelId)) return
trackPixelEvent(options)
}