2
0

🐛 (pixel) Fix multiple Meta pixels tracking

Closes #846
This commit is contained in:
Baptiste Arnaud
2023-09-26 10:22:02 +02:00
parent a176e23cc8
commit 56e175bda6
4 changed files with 22 additions and 18 deletions

View File

@ -333,21 +333,21 @@ const parseStartClientSideAction = (
block.options.trackingId
) as GoogleAnalyticsBlock | undefined
)?.options.trackingId,
pixelId: (
blocks.find(
pixelIds: (
blocks.filter(
(block) =>
block.type === IntegrationBlockType.PIXEL &&
block.options.pixelId &&
isNotEmpty(block.options.pixelId) &&
block.options.isInitSkip !== true
) as PixelBlock | undefined
)?.options.pixelId,
) as PixelBlock[]
).map((pixelBlock) => pixelBlock.options.pixelId as string),
}
if (
!startPropsToInject.customHeadCode &&
!startPropsToInject.gtmId &&
!startPropsToInject.googleAnalyticsId &&
!startPropsToInject.pixelId
!startPropsToInject.pixelIds
)
return