• Resolved tipat

    (@tipat)


    Nice to have this plugin sync products with FB, but wondering if you add FB pixel to Google Tag Manager also, wont this create a duplicate FB pixel?
    Is there a way to use GTM along side this plugin?
    What do most of you do when using GTM to have all tags in one place to manage?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi @tipat!

    Thanks so much for your question! It’s a good question for the community here, as I’m afraid I have no experience with running Tag Manager alongside our plugin.

    That said if you did want to prevent our plugin from using any tracking code, this would be possible with a custom code snippet.

    
    add_filter( 'facebook_for_woocommerce_integration_pixel_enabled',
    '__return_false', 10, 1 );
    

    This tells the plugin to avoid printing any tracking code to the page when disabled. Would this be helpful for you if you’re looking to use GTM instead?

    Cheers!

    Simon.

    Hey Simon,

    This is indeed useful for anyone looking to use GTM.
    Is there a way to disable the pixel but keep the events firing?
    I’m asking this because it would be easy to implement only the Facebook Pixel (library and PageView) via GTM but still have the events firing using your plugin (since it’s going a good job with it) instead of implementing all the event tracking via GTM.

    Thread Starter tipat

    (@tipat)

    Thanks Simon

    >This tells the plugin to avoid printing any tracking code to the page when disabled.

    I guess @skyverge you meant “when enabled” ??

    It could be a matter of of a simple toggle in maybe a future update of the plugin, so we do not have to recall to add custom code snippets when we update, well I hope.

    @odeezl sounds good too, but would like for you to elaborate what you mean and how you use it too, maybe helpful for all of us.

    Thank you.

    @tipat here is what I’m working on right now and why I think keeping the events would be good.

    Since we like to use GTM to manage scripts I needed to find a solution to implement GDPR compliance on the website since all of the plugins available for WP does not provide a logical way to work with GTM.

    What I found is working with OneTrust can get the job done, I followed this guide which explains in detail how to make it work.

    By following the guide, in GTM you will have control over which pixels are fired and which not depending on the cookie setting selected by the user which is ideal and what we are looking for.

    This only leaves the “issue” with Facebook for Woocommerce which adds the pixel “plugin side” and not “GTM side” and can not be controlled with this method.
    Which brings me to my request. If we can only disable the “page view” pixel form firing from the “plugin side” we can set that in GTM and control based on user cookie settings. Since the “page view” pixel contains the Facebook library js, if it’s not firing, events will not be registered anyway so no need to disable these.

    To conclude, if the events are kept in “Facebook for woocommerce” we can only fire the “page view” pixel from GTM when we need it, and all events will work from “Facebook for woocommerce” side. If the “page view” is nor firing, these events will not be registered anyway.
    This way we keep some of the benefits of “Facebook for woocommerce” and save time creating all these events in GTM.
    I hope this makes sense ??

    • This reply was modified 4 years, 8 months ago by odeezl.

    Hi @odeezl,

    Thanks for getting back to me. Unfortunately, there wouldn’t be a way to untangle the loading of the pixel init as well as keep the events firing. This filter will completely remove the pixel tracking from the plugin, which involves the initial loading of pixel and subsequent fbq() events.

    @tipat yes, my apologies! I think I used confusing terminology there. When the snippet is active it will disable tracking, which is what I meant by it being disabled/returning false! Sorry about the confusion there.

    I’m not aware of any roadmap item to add this to the plugin at the moment, though I can surely record this as feedback for you! That said, the filter isn’t likely to be changed either, so this code will stay separate to the plugin and allow you to update as you like, and still keep the pixel tracking disabled.

    In the new version of the plugin we will be utilizing server to server tracking which is available in Facebook’s latest API. While the front end pixel tracking will still be needed too, this may make it slightly easier as there should be less front-end events to create in GTM when the event tracking disabled in the plugin.

    Does this sound like it might be a useful workaround?

    Cheers!

    Simon.

    Hey @skyverge
    Thank you for your reply. I’m not sure if the “server to server” tracking would help with this so we will just need to wait and see if it does.
    In the meantime, do you know if there is a way to disable the pixel using GTM and not the theme function?

    Hi @odeezl,

    I’m afraid I’m not versed in GTM as we only support the Facebook for WooCommerce plugin. Perhaps one of the community may be able to assist, or Google support?

    Cheers!

    Simon.

    I looked around for if disabling the pixel can be pushed from GTM but did not find a way to do that.
    I ended up just disabling it from the function.php file and added all the Facebook pixels manually via GTM.
    Thanks for the support!

    Hey @odeezl,

    Ahhh, thanks so much for coming back to let us know! Hopefully this will be useful to other merchants in a similar position.

    Glad you could get it working in the end though with the snippet! That’s great stuff. Any other questions or issues, please don’t hesitate to let me know. ??

    Cheers,

    Simon.

    This is the best thing. I was looking for this from a long time. Thanks again.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘GTM with FB for WC?’ is closed to new replies.