How to use Facebook Custom Audience Pixel in woocommerce wordpress without having any “activated multiple times on this web page..” error?

I have created a plugin for wordpress that adds Facebook Custom Audience Pixel conversion codes for woocommerce pages but i’m having problem with the addtocard coversion codes and pageview. I added viewcontent and pageview on all pages.

1st option: when product page just refreshes after clicking the button, viewcontent and pageview are loaded multiple times.

Read More

2nd option: when product page redirects to cart page after clicking the button, only the pageview is loaded multiple times.

what do i need to do to limit conversion codes to only 1 per page?

Related posts

1 comment

  1. I’ve stumbled exactly to the same issue and the only reference I’ve found is this post:
    Pixel Activated Multiple Times for Facebook Pixel Tracking

    Apparently, the presence of an iFrame in your page causes it.
    Once I removed the iFrame this didn’t happen.

    I believe this happens as Facebook pixel code appends this script “//connect.facebook.net/en_US/fbevents.js” to the header of your document

Comments are closed.