Analytics: Add Facebook Meta Pixel Tracking Script to WordPress

Analytics add facebook meta pixel tracking script to wordpress image

Up your analytics game in the metaverse, bro!

What it does…

Adds Facebook / Meta pixel tracking script to your site. NOTE: You’re gonna wanna add your own unique FB Meta Pixel ID in the code, then let this snip take care of the rest.

How it does it…

Adds the tracking JavaScript code to the head of your site using `wp_head`, but only on Production (if using Env555), and only for logged-in users. (But you could edit those parts, if desired.)

Download JSON for importing into Code Snippets Pro
Download PHP for adding as a plugin or copying into functions.php

Related Snips