JS Code is showing for the last couple of days

[ad_1]

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!

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.

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!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer