• Resolved brennsuppa

    (@brennsuppa)


    When Facebook for Woocommerce is active, following code is shown on top of each page:

    !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');

    Since the connection works and caching plugins don’t cause this I hope this is an error that can be fixed otherwise.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @brennsuppa

    The code you’re seeing is actually the Facebook Pixel code. This is a piece of JavaScript code that allows you to measure, optimize and build audiences for your advertising campaigns. When correctly installed, this code should not be visible on your website pages, so I understand your concern.

    There could be a few reasons why this is happening. It might be due to a conflict with your theme or another plugin, or it could be due to the incorrect placement of the code manually.

    Here are a few steps you can follow to troubleshoot this issue:

    Code Placement: I checked the placement of the Facebook Pixel code on your website added by Facebook for the WooCommerce plugin. It appeared to be in your website’s header, not the body or the footer. It means the Facebook for WooCommerce plugin does not generate the issue but comes from another theme or plugin.

    Theme Conflict: Temporarily switch your theme to the default Storefront theme and check if the issue persists. If it doesn’t, the problem might be with your current theme.

    Plugin Conflict: Deactivate all your plugins except WooCommerce and Facebook for WooCommerce. If the issue disappears, reactivate your plugins one by one to identify which one is causing the conflict. You can find a more detailed explanation of conducting a conflict test here.

    If none of these steps resolve the issue, I recommend reinstalling the Facebook for WooCommerce plugin. Make sure to back up your site before doing this, as you would need to reconfigure the plugin settings after reinstallation.

    I hope this helps! If you have any other questions, feel free to ask.

    Thanks!

    Thread Starter brennsuppa

    (@brennsuppa)

    Hi @shameemreza

    thank you for your help, it appears that gTranslate tries to translate the code thus making it appear on the header.

    Just gotta find a way to not translate this anymore now.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hello @brennsuppa

    I’m glad to know that you found the culprit.

    Since this is a third-party plugin which we don’t provide support for (please see our Support Policy), it would be best to reach out to the plugin’s developers for further assistance here.

    Meanwhile, I’ll be marking the thread as solved for now, but feel free to open a new one if you have any other questions.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘JS Code is showing for the last couple of days’ is closed to new replies.