Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
redasalmi opened this issue May 26, 2022 · 0 comments

Comments

@redasalmi
Copy link

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 ?

exports.trackTikTokPixel = (options) => {
if (
getCookie(options.cookieName) === `true` &&
validTikTokPixelId(options) &&
typeof window.fbq === "function"
) {
window.fbq(`track`, `PageView`)
window.ttq.page()
}
}

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 redasalmi changed the title Disable PageView event per default for tiktok and facebook pixel Allow to disable PageView event per default for tiktok and facebook pixel May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant