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?
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.Sign up to join this community
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.
<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
For Craft 3, look in your
If you're using SEOmatic for Craft3 it has a setting to add facebook pixel and various other tracking scripts.