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/)
 * 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&#8217](https://connect.facebook.net/en_US/fbevents.js&#8217););
   fbq(‘init’, ‘PIXELID’); 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=PIXELID&ev=PageView&noscript=1&#8243](https://www.facebook.com/tr?id=PIXELID&ev=PageView&noscript=1&#8243);/
   ></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%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Vlad](https://wordpress.org/support/users/vladytimy/)
 * (@vladytimy)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/connect-fb-pixel-using-code/#post-14062667)
 * Hi, [@ushirogami](https://wordpress.org/support/users/ushirogami/)
 * I recommend asking at [https://wordpress.org/plugins/official-facebook-pixel/](https://wordpress.org/plugins/official-facebook-pixel/)
   so the plugin’s developers and support community can help you with this.
 * Kind regards!
 *  Thread Starter [ushirogami](https://wordpress.org/support/users/ushirogami/)
 * (@ushirogami)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/connect-fb-pixel-using-code/#post-14062690)
 * Hi [@vladytimy](https://wordpress.org/support/users/vladytimy/)
    thank you very
   much for the suggestion 🙂
 * Have a nice day!

Viewing 2 replies - 1 through 2 (of 2 total)

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

## Tags

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

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 2 replies
 * 2 participants
 * 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/#post-14062690)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
