Title: Facebook Pixel
Last modified: August 31, 2016

---

# Facebook Pixel

 *  [marianacruiz](https://wordpress.org/support/users/marianacruiz/)
 * (@marianacruiz)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/facebook-pixel-2/)
 * I am trying to add the Facebook Tracking pixel to my site and I am not sure where
   to add it using this theme. In the Facebook instructions it says to add it between
   the <head> and </head> brackets for each page. Can anyone help me with this?
 * This is the link to the instructions [https://www.facebook.com/business/help/218844828315224](https://www.facebook.com/business/help/218844828315224)
 * This is my site
    MarianaCRuiz.com

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

 *  [Ampboy](https://wordpress.org/support/users/ampboy/)
 * (@ampboy)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/facebook-pixel-2/#post-6918011)
 * You want to go to appearance, then editor and find Theme Header (header.php) 
   In that file, you want to add that link anywhere in this area:
    **<head>** <meta
   charset=”<?php bloginfo( ‘charset’ ); ?>”> <meta name=”viewport” content=”width
   =device-width, initial-scale=1″> <title><?php wp_title( ‘|’, true, ‘right’ );?
   ></title> <link rel=”profile” href=”[http://gmpg.org/xfn/11″&gt](http://gmpg.org/xfn/11″&gt);
   <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>”> <?php if ( 
   of_get_option( ‘favicon’ ) ) echo ‘<link rel=”shortcut icon” href=”‘.esc_url(
   of_get_option( ‘favicon’ ) ).'” />’; ?> <?php wp_head(); ?> **</head> **
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/facebook-pixel-2/#post-6918013)
 * It is recommended that you _not_ edit the theme files directly. If the theme 
   ever gets updated, then the changes will be lost.
 * Mariana, you can do it one of two ways:
    1. Create a [child theme](http://codex.wordpress.org/Child_Themes), then copy the
       header.php file over from the Sugar & Spice folder over to your child theme’s
       folder and make your changes to that copy.
    2. Use a plugin that will inject your script code in the head section of your site.
       I use [Header and Footer](http://wordpress.org/plugins/header-footer/) to add
       Google’s Analytics code, you can do the same with the Facebook tracking script.
       Once you install the plugin, go to **Settings → Header and Footer** and paste
       your Facebook tracking code into the field labeled **Code to be added on HEAD
       section of every page** and click the **Save** button.
 * The plugin (second option) will be much easier than creating a child theme.

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

The topic ‘Facebook Pixel’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/sugar-and-spice/1.3.2/screenshot.
   png)
 * Sugar and Spice
 * [Support Threads](https://wordpress.org/support/theme/sugar-and-spice/)
 * [Active Topics](https://wordpress.org/support/theme/sugar-and-spice/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/sugar-and-spice/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/sugar-and-spice/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/facebook-pixel-2/#post-6918013)
 * Status: not resolved