Answers.Body: <p>Craft makes no assumptions on how your site should be built so it's impossible for us to say exactly where to put the pixel code. </p>
  
  <p>You would add the code to whichever template you needed it in. This depends entirely on how your site is put together.</p>
  
  <p>Oftentimes the <code>&lt;head&gt;</code> portion will be within your main <code>_layout</code> file but that is not necessarily always the case. This file can also be anywhere within your templates directory.</p>
  
  <p>For Craft 2, look in your <code>/craft/templates</code> directory
  For Craft 3, look in your <code>/templates</code> directory</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-14T20:44:16.943Z
Answers.LastActivityDate: 2018-11-15T10:52:50.420Z
Answers.LastEditDate: 2018-11-15T10:52:50.420Z
Answers.UserDisplayName: foamcow
Answers.Body: <p>If you're using SEOmatic for Craft3 it has a setting to add facebook pixel and various other tracking scripts.</p>
  
  <p><a href="https://github.com/nystudio107/seomatic" rel="nofollow noreferrer">SEOmatic github</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T00:25:50.637Z
Answers.Text: Thanks Steven, if I don't have that plugin, is there any way to do it for free?
Answers.UserDisplayName: Jordan Hayes
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-16T13:01:23.017Z
Answers.Text: If you don't use that plugin you can use the answer foamcow gave and manually insert it in your template code.
Answers.UserDisplayName: Steven Vandemoortele
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-15T09:41:09.397Z
Answers.LastActivityDate: 2018-11-15T09:41:09.397Z
Answers.UserDisplayName: Steven Vandemoortele
Body: <p>How do I add the html code to the head of my website in Craft CMS? </p>
  
  <p>Do I need to install a plugin, or is there somewhere I can access the code?</p>
  
Tags: <getheadhtml><headers>
Title: How to add Facebook pixel code to my website
ThreadText: # How to add Facebook pixel code to my website
  
  (Asked by: username_0 on 2018-11-14)
  
  How do I add the html code to the head of my website in Craft CMS?
  
  Do I need to install a plugin, or is there somewhere I can access the code?
  
  **Tags:** getheadhtml, headers
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-11-14. Score: 2
  
  Craft makes no assumptions on how your site should be built so it's impossible for us to say exactly where to put the pixel code.
  
  You would add the code to whichever template you needed it in. This depends entirely on how your site is put together.
  
  Oftentimes the `<head>` portion will be within your main `_layout` file but that is not necessarily always the case. This file can also be anywhere within your templates directory.
  
  For Craft 2, look in your `/craft/templates` directory
  For Craft 3, look in your `/templates` directory
  
  
  ---
  
  ### Answer by username_2 on 2018-11-15. Score: 1
  
  If you're using SEOmatic for Craft3 it has a setting to add facebook pixel and various other tracking scripts.
  
  [SEOmatic github](https://github.com/nystudio107/seomatic)
  
  > **Comments:**
  > **username_0**: Thanks username_2, if I don't have that plugin, is there any way to do it for free?  
  > **username_2**: If you don't use that plugin you can use the answer username_1 gave and manually insert it in your template code.  
  
  ---
  
  