gatsby-plugin-gdpr-cookies icon indicating copy to clipboard operation
gatsby-plugin-gdpr-cookies copied to clipboard

Allow to disable PageView event per default for tiktok and facebook pixel

Open redasalmi opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. Is there any particular reason to trigger the window.fbq('track', 'PageView') event inside of the trackTikTokPixel function ?

https://github.com/andrezimpel/gatsby-plugin-gdpr-cookies/blob/02ce0e6aed6277b34041c6f9ca662ec26abad752/src/services/tiktok.js#L35-L44

Describe the solution you'd like It would be really helpful to have a way to opt out of the PageView event for the tiktok tracker or in general, like a pageViewDisable bool field inside of gatsby-config.js for the facebookPixel and tikTokPixel objects.

Additional context My problem is that I wanted to add the eventID param to the PageView event for facebook pixel, after adding it manually (I had to opt out of the gatsby-gdpr-facebook-pixel and install fbevent.js manually because there is no way of doing it with this package), I got a warning that the event is getting duplicated and found out it was getting triggered by the trackTikTokPixel.

redasalmi avatar May 26 '22 10:05 redasalmi