Adsmurai-Google-Tag-Manager-Templates / adsmurai-facebook-pixel-and-conversions-api

Google Tag Manager template that fires Facebook, TikTok & Pinterest events through regular pixel and Conversions API.
Apache License 2.0
19 stars 8 forks source link

disablePushState #4

Closed DigitalConnexia closed 2 years ago

DigitalConnexia commented 2 years ago

Hi, it would be a good improvement for your tag template to have an option to disable default tracking for PushState on PWA/SPA applications

fbq.disablePushState = true

cfr: https://developers.facebook.com/docs/meta-pixel/implementation/tag_spa (Note: You can set disablePushState to true to stop sending PageView events on history state changes but it is not recommended)

angelbt91 commented 2 years ago

Hi!

Thanks for opening this issue :)

I was unaware of this feature, thanks for notifying me about it. I will check the docs to understand more about it and I'll probably add it in the next version of the template, which should be coming soon.

Whenever the next version with that feature is released, I will make sure to notify that in this issue.

Thanks!

DigitalConnexia commented 2 years ago

Thanks. In our opinion it is important because the mere fact of having the FB client library sends those hits to FB and they do not pair with server side ones. (this hits do not appear also in GTM, you can see them only via network requests)

angelblancoadsmurai commented 2 years ago

I just released this template's version 1.0, which adds support for "disablePushState" under the "Pixel setup" tab :) In the next hours GTM should notify you about a new version of this tag.

If you find any bug, feel free to open another issue.

Thanks again for opening this one to let me know about this feature! :)