Title: Connect FB Pixel using code
Last modified: February 17, 2021

---

# Connect FB Pixel using code

 *  [ushirogami](https://wordpress.org/support/users/ushirogami/)
 * (@ushirogami)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/connect-fb-pixel-using-code-2/)
 * Hi everyone, I installed a FB pixel in this WooCommerce website: [https://scarpettadivenere.it/](https://scarpettadivenere.it/)
   
   Pixel Helper says that an event code is detected but the pixel has not activated
   for this event. In fact, I’m not able to see purchases in my campaigns after 
   one month of activity.
 * The code is:
 * Facebook Pixel Code –> <script>!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’); fbq(‘init’, ‘114869556040501’); fbq(‘track’, ‘PageView’);
 * fbq(‘track’, ‘Purchase’, {value: <?php echo $order->get_order_total(); ?>,
    currency:‘
   EUR’});</script> <noscript><img height=”1″ width=”1″ style=”display:none” src
   =”https://www.facebook.com/tr?id=114869556040501&ev=PageView&noscript=1″ /></
   noscript> <!– End Facebook Pixel Code –>
 * How can I fix it? I’m interested in Views and Purchase events only.
 * Thank you very much for your support!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconnect-fb-pixel-using-code-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Connect FB Pixel using code’ is closed to new replies.

 * ![](https://ps.w.org/official-facebook-pixel/assets/icon.svg?rev=3158868)
 * [Meta pixel for WordPress](https://wordpress.org/plugins/official-facebook-pixel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/official-facebook-pixel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/official-facebook-pixel/)
 * [Active Topics](https://wordpress.org/support/plugin/official-facebook-pixel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/official-facebook-pixel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/official-facebook-pixel/reviews/)

## Tags

 * [fb](https://wordpress.org/support/topic-tag/fb/)

 * 0 replies
 * 1 participant
 * Last reply from: [ushirogami](https://wordpress.org/support/users/ushirogami/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/connect-fb-pixel-using-code-2/)
 * Status: not resolved