Meta Pixel lets you measure visits and conversions from your Facebook and Instagram ads. On SDP Platform you add it once in your website's global code, and it loads on every page. This guide follows Meta's official steps in Set up and install a Meta Pixel.
What you need
- A Meta Business Suite account with access to Meta Events Manager
- Access to your website in the SDP dashboard
Step 1: Open Events Manager and click Connect data
Open Meta Events Manager and make sure your business is selected in the top-right menu. Then click Connect data in the left menu.
Step 2: Choose Web
In Connect a new data source, select Web and click Next. Give your dataset a name, such as your website's name, and continue.
Step 3: Choose to add the code yourself
In Set up Meta Pixel, choose Add Meta Pixel code to website yourself and click Next.
Step 4: Copy the base code
On the Copy base code step, click Copy code. The code looks like this, with your own Pixel ID in place of YOUR_PIXEL_ID:
<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=YOUR_PIXEL_ID&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->
Step 5: Paste the code into Header Scripts in SDP
1. Sign in to the SDP dashboard. On My Websites, click your website's card to open it.
2. In the website editor, open the Advanced tab, then choose Scripts & Robots.txt. You'll see three editors: Header Scripts, Footer Scripts and Robots.txt.
3. In Header Scripts, paste the Meta base code below any code that's already there. Don't delete or change existing scripts. Then click the Save button for that editor (each editor has its own Save button).
Header Scripts load on every page of your website, so the pixel now tracks all pages.
The Advanced tab is also where you manage other site-wide code. For site-wide styles, see How to Add Custom CSS.
Step 6: Test that it works
In Meta Events Manager, open your dataset and go to the Test events tab. Choose Website, enter your website address, open it, and browse a page or two. You should see PageView events marked Processed.
You can also install the Meta Pixel Helper Chrome extension and visit your site. It shows whether the pixel is found and firing.
Allow a few minutes. New pixels can take a while to show events. Ad blockers and privacy browsers can also stop the pixel, so test in a normal browser window without them.
Optional: Track standard events such as Lead
PageView is tracked on every page automatically. To track actions such as form submissions, add a standard event, for example fbq('track', 'Lead');, where the action happens. See Meta's standard events reference and Meta Pixel get started guide.
How to undo it
To remove the pixel, open Advanced → Scripts & Robots.txt → Header Scripts and delete everything from <!-- Meta Pixel Code --> to <!-- End Meta Pixel Code -->, then click Save. SDP keeps an edit history for these scripts (the clock icon next to Save), so you can also restore a previous version of Header Scripts. Before bigger changes, it's a good idea to download a website backup.