I’m having a heck of a time trying to get the Facebook Pixel code to work in the header of my RW 7 file. It is supposed to be placed into the header section which I do just fine, but as soon as I preview it, it effectively wipes out my entire top section of my website.
I’m using the Halogen theme and the header background image is inserted using CSS as per this theme’s instructions. Everything worked fine until I added the Facebook pixel code.
I probably need to figure out who made the Halogen theme so I can ask them specifically.
I know RW 8 is out and I own it but haven’t had time to change this website over to it. And I’m not sure that would fix this issue either. I’d rather troubleshoot this in RW 7 and get it working, then at a later date, figure out how to upgrade the website to 8.
I’ve tried pasting it into the Home Page’s HTML Code > Head section. And I’ve also tried to paste into the Settings > Code > Head. Both break the header area completely on my site.
Do you know if it is okay to just put it in the HTML Code > Body section instead? That doesn’t break anything.
Also, does anyone know if this code should JUST be inserted on the Home page or should it be on every page of the website?
i’m guessing it has something to do with the code that you’re pasting in. perhaps it has <script> tags already built in – and you’re pasting it in to the script section – or something similar.
can you post the code that you’re pasting in? and what part of RW specifically you are attempting to paste it to?
CODE HAS BEEN REMOVED SINCE THE ISSUE HAS BEEN SOLVED.
I’m attempting to plant that into the Home Page’s Inspector > HTML Code tab (3rd one) > Head.
The other script in that same place works just fine. I’ve tried deleting it to see if they conflict and even without that first script, the Facebook Pixel script removes my entire header section including the nav bar. logo, background image, etc.
…you’ll find that you can only use the no-script tag in the head of a page if it contains only link, style, or meta tags. the no-script tag in your code contains an img tag – so it’s going to cause problems.
my guess is that this block of code probably isn’t meant to be put into the head – but meant to go somewhere else, like at the end of the body tag.
if you do put it into the head, then you’ll have to move the no-script bit out and put at least that bit into the body – or just remove it entirely. folks that turn of JS probably don’t really want to be tracked – maybe it’s a kindness just to let them go.
Glad you got things working. For what it’s worth I got the FB Pixel code to work fine on my end using RW 8 via your initial method (i.e. pasting code into the site wide head section of the settings/code area). My site seemed to function fine with the code installed. I’m using Foundation. Thought I would share for the group in case it helps anyone else. Regardless glad yours is working
Note I do have a post trying to pass the code via Total CMS (separate issue)