Woocommerce Integration HTML Code
-
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″ /></noscript>
- The topic ‘Woocommerce Integration HTML Code’ is closed to new replies.