• Resolved Michalis Savva

    (@mikedvx)


    Hello,

    I have a question regarding woocommerce integration.

    The pixel script code seems to be separate in three parts. Meta guide has everything in one script. Is it correct?

    Part A:


    !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’);

    Part B:


    fbq(‘init’, ‘xxxxxxxxxxx’, { “em”: “[email protected]”, “fn”: “michalis”, “ln”: “savva”, “external_id”: “2”, “ct”: “larnaka\/mosfiloti”, “zp”: “5330”, “ph”: “xxxxxxxx”, “cn”: “gr” }, { “agent”: “woocommerce-8.3.1-3.1.4” }); fbq( ‘track’, ‘PageView’, { “source”: “woocommerce”, “version”: “8.3.1”, “pluginVersion”: “3.1.4” } ); document.addEventListener( ‘DOMContentLoaded’, function() { jQuery && jQuery( function( $ ) { // Insert placeholder for events injected when a product is added to the cart through AJAX. $( document.body ).append( ‘<div class=\”wc-facebook-pixel-event-placeholder\”></div>’ ); } ); }, false );

    and Part C:

    <noscript><img height=”1″ width=”1″ style=”display:none” src=”https://www.facebook.com/tr?id=xxxxxxxxx&ev=PageView&noscript=1&#8243; /></noscript>

Viewing 8 replies - 1 through 8 (of 8 total)
  • anastas10s

    (@anastas10s)

    Hi there @mikedvx ??

    Thank you for reaching out about this. I’d be happy to help you with this.

    Woocommerce Integration HTML Code

    Just to clarify, this forum is about providing support for issues that might arise when utilizing the Facebook for WooCommerce?plugin to connect your WooCommerce store to Facebook, to help people discover your eCommerce shop. No manual HTML code is necessary, as there is a setup wizard for connecting the two.

    Just to clarify, is this about the site at https://broom.com.cy/, found in your profile here, or otherwise? It appears the Pixel was added manually there, when I checked with the Pixel Helper.

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

    Thread Starter Michalis Savva

    (@mikedvx)

    Hello @anastas10s and thank you for your prompt reply

    That’s the correct website, we have manually added the pixel code today because we were dealing with some issues inside the meta events’ manager.

    Can you please inspect the website and search for “fbq”, you will be able to find the woocommerce integration html code. The code is separated in 3 parts.

    Can we manually fix the HTML code for the plug-in, in order to remove the meta pixel manually code?

    Best Regards

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hello @mikedvx,

    If you’ve manually added the pixel code and are experiencing issues, it’s recommended to remove the manually added code. The plugin should handle this automatically once configured correctly.

    To manually fix the HTML code for the plugin, you would need to access your site’s theme files and remove the manually added pixel code. This is usually located in the header.php file of your active theme.

    However, please be aware that editing theme files requires a certain level of technical knowledge and can potentially cause issues with your site if not done correctly. If you’re not comfortable doing this, you might need to consider reaching out to a developer or someone with experience in this area.

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

    Thread Starter Michalis Savva

    (@mikedvx)

    Hello Shameen,

    We haven’t edited the plug-in HTML code. But if it’s actually incorrect, then we should fix it.

    Could you please send me the correct script (HTML code) for the plug-in?

    Thread Starter Michalis Savva

    (@mikedvx)

    @shameemreza, Please check the below pictures. The plug in code is in three parts. Which is seems incorrect based on the meta pixel guide

    https://broom.com.cy/wp-content/uploads/1-1.jpg

    https://broom.com.cy/wp-content/uploads/2-2.jpg

    https://broom.com.cy/wp-content/uploads/3-3.jpg

    Mirko P.

    (@rainfallnixfig)

    Hi @mikedvx

    We haven’t edited the plug-in HTML code. But if it’s actually incorrect, then we should fix it.

    Thank you for your feedback. Why would you think the plugin code is incorrect and we should fix it? Can you please clarify?

    And yes, you are correct. The Facebook Pixel code for WooCommerce integration is indeed divided into three parts. This is done to handle different aspects of the integration.

    Part A: This is the base code that loads the Facebook Pixel on your site. It initializes the Facebook Pixel and sets up the necessary infrastructure for tracking events on your site.

    Part B: This is the event code. It’s responsible for sending specific events to Facebook when certain actions are taken on your site. For example, when a user views a page, adds a product to their cart, or makes a purchase. The event code is customized for your specific site and can include parameters that provide additional information about the events that are tracked.

    Part C: This is the noscript code. It ensures that the Facebook Pixel still works for people who have JavaScript disabled in their browser. It uses an image request to track page views.

    The Meta guide might have everything in one script to simplify the process, but separating the three parts can make it easier to manage and troubleshoot issues with the Facebook Pixel on your site.

    If you’re having issues with the pixel in your setup, please reinstall the Facebook for WooCommerce plugin and send along your system status, as well as any fatal error logs, and a description of what isn’t working properly.

    Thanks!

    Thread Starter Michalis Savva

    (@mikedvx)

    @rainfallnixfig Thank you very much, that was my question at first place. If the plug-in code is correct.

    anastas10s

    (@anastas10s)

    Hi there @mikedvx ??

    It appears that this thread has been answered now, so I’m going to mark this as resolved – feel free to open a new one, should you need assistance with anything else. Cheers!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Woocommerce Integration HTML Code’ is closed to new replies.