No, you cannot place it in the head, as it contains a div tag. You will need to place an embed component as the first item on the page, then paste the code in it.
I’ve been having the same problem adding the universal Facebook Pixel (the new one). If I want this site wide (like a google analytics code) do you have advice on that? Thanks for your time.
Hi @samliew, I was thinking, one possible workaround, until updates are released, may be to use some javascript placed in the footer, to write out the divs needed for FB pixel and use javascript to append that to the body.
@cyberdave any idea on the ETA for the custom code module update? Also, any chance you could provide an example of using the above process? Greatly appreciated.
From what I can understand from the official Facebook Pixel documentation, I do not see a need for that. Although they recommend to put the pixel code in the header, we can still use the Site Footer Custom Code block and it should work the same.
We’ve tried inserting the standard Facebook Pixel in both the custom code header and body separately with no luck. That said, I know it’s not a pixel error because I’ve tested the same pixel on a Hubspot hosted site and it worked just fine.