Title: Add Custom Code to Head
Last modified: September 13, 2019

---

# Add Custom Code to Head

 *  Resolved [elenio](https://wordpress.org/support/users/elenio/)
 * (@elenio)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/add-custom-code-to-head/)
 * Add Custom Code to Head
 * Hi all,
    we are using your plugin to track FB in woo. we have created multiple
   landing pages, but now the facebook pixel does not fire any category or product
   events (obviously). is there a way to simulate this? we have tried to implement
   this snippet in the head:
 * <script>
    fbq(‘init’, ‘xxxx’); fbq(‘trackCustom’, ‘ViewCategory’, { content_name:‘
   Kauknochen fu00fcr Hunde’, content_category: ‘Kauknochen’, content_ids: [‘4154’,‘
   4183’, ‘4165’, ‘4171’, ‘4176’], // top 5-10 results content_type: ‘product’ });
   </script>
 * with the the facebook pixel helper, we can see that this event is detected, but
   not activ. and we cannot see it arriving in facebook.
 * This would be an example of the landing pages:
    NEW – [https://www.irish-pure.de/trockenfutter-hund/](https://www.irish-pure.de/trockenfutter-hund/)
   OLD – [https://www.irish-pure.de/hundetrockenfutter-mit-hohem-fleischanteil/](https://www.irish-pure.de/hundetrockenfutter-mit-hohem-fleischanteil/)
 * Do you have an idea?
    thanks! Elenio
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadd-custom-code-to-head%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/)
 * (@pixelyoursite)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/add-custom-code-to-head/#post-11928297)
 * Hi,
 * If you want to fire your own events use the Events tab to configure them.
 * Don’t add event’s code with our Head & Footer option, because it will not work.
   This part will load before the main pixel code, having no real effect.
 *  Thread Starter [elenio](https://wordpress.org/support/users/elenio/)
 * (@elenio)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/add-custom-code-to-head/#post-11928335)
 * Hi, thanks a lot for the quick response!
    just to confirm: we create a new event
   with event type= “custom” and add the necessary parameters in.
 * from a testing perspective it looks good. just wanted to reassure.
 * thanks!
    elenio
 *  Plugin Author [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/)
 * (@pixelyoursite)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/add-custom-code-to-head/#post-11928360)
 * The event itself is good, but I think you’ve used the wrong IDs.
 * Try using the same values from the “OLD” page event. You have the IDs on the 
   new one, but the old event uses a different combination: wc_post_id_4068
 * I guess you create your Product Catalog with Facebook for WooCommerce, and this
   is their ID logic.
 *  Thread Starter [elenio](https://wordpress.org/support/users/elenio/)
 * (@elenio)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/add-custom-code-to-head/#post-11928376)
 * yeah ok. thanks for the hint and the great support :)!
 *  Plugin Author [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/)
 * (@pixelyoursite)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/add-custom-code-to-head/#post-11928422)
 * Thanks!
 * I don’t mind a 5 stars review, by the way 🙂

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

The topic ‘Add Custom Code to Head’ is closed to new replies.

 * ![](https://ps.w.org/pixelyoursite/assets/icon-256x256.jpg?rev=3178123)
 * [PixelYourSite - Your smart PIXEL (TAG) & API Manager](https://wordpress.org/plugins/pixelyoursite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pixelyoursite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pixelyoursite/)
 * [Active Topics](https://wordpress.org/support/plugin/pixelyoursite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pixelyoursite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pixelyoursite/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [PixelYourSite](https://wordpress.org/support/users/pixelyoursite/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/add-custom-code-to-head/#post-11928422)
 * Status: resolved