Skip to main content
Facebook Pixel

Add a Facebook pixel to your site.

Niall Diamond avatar
Written by Niall Diamond
Updated over a week ago

Let's learn how to setup a Facebook Pixel on our site. If you haven't already, you will need to setup a Facebook Business account. Checkout the details at

Once you have the business account you can move on to setting up the Pixel.

Advanced Monitoring script

πŸ‘ Important: Make sure to add your Pixel ID into the script before you publish the code.

// We are in the header so can't use bodyclasses to determine whether we are logged in or not
if (EvoXLayer().user.user_id !== null) {
let name = () => {
let name = EvoXLayer();
return name.split(" ");
let phone = () => {
if (EvoXLayer().user.cell == '') {
return EvoXLayer()
} else {
return EvoXLayer().user.cell
// fb push event
fbq('init', 'replace_this_with_your_px_id', {
em: EvoXLayer(), //Values will be hashed automatically by the pixel using SHA-256
fn: name()[0],
ln: name().slice(1).join(" "),
ph: phone(),
external_id: EvoXLayer().user.user_id

That's it, have a great day πŸŽ‰

Did this answer your question?