Meta Pixel Installation Guide: Bricks and Elementor

The Meta Pixel (formerly known as the Facebook Pixel) is a short snippet of JavaScript code that is essential for any website that has or plans to run advertising. This code allows you to measure visitor interactions, track conversions, and build precise remarketing lists.

1. Why not dig into the template files?

Many people try to code directly in the template header.php This should be avoided for two reasons:

  • It disappears when updating: As soon as you update your WordPress theme, the system overwrites the files, so your manually entered Pixel code is immediately deleted and data collection stops.
  • Dangerous: If you are not familiar with PHP coding, even a single typo or misplaced character can cause a „white death” (unloadable website).

Modern editors (Bricks, Elementor, Divi, etc.) all have their own dedicated place for these codes, which is update-proof and secure. If you don't use one of these tools, a snippet plugin is still the way to go.

2. Get the code

You can generate the code in the Meta Events Manager interface. Under the Data Sources menu item, select the Pixel Setup option to get the code snippet required for manual installation. It consists of a script block and a noscript block.

3. Installation under Bricks Builder

Bricks offers a native solution for handling external scripts, so no additional plugins are required.

  1. In your WordPress admin, go to Bricks > Settings.
  2. Click the Custom Code tab.
  3. Paste the entire copied code into the Header scripts field.
  4. (Optional pro setting): You can cut and paste the noscript part of the code into the Body (header) scripts field.
  5. After saving, clear the website cache.

4. Installation under Elementor Pro

Elementor's own Custom Code feature is the cleanest solution for placing code.

  1. In the admin interface, select Elementor > Custom Code.
  2. Click the Add New button.
  3. Give the code snippet a name (e.g. Meta Pixel Base Code).
  4. Keep Location as is.
  5. Paste the code into the text field.
  6. Click the Publish button and set the display condition in the pop-up window: Entire Site.

5. Data Protection and Cookie Management (GDPR)

If you use a cookie management plugin on your website (such as CookieYes or Complianz), you should use the plugin's own interface instead of the methods above.

The problem: If you put the code in the editor settings, it will run before the visitor has given permission, which violates GDPR rules. The solution: In the cookie manager settings, look for the Marketing or Tracking scripts section. Paste the Pixel there. This way, the extension will only activate the code if the visitor has clicked the Accept button.

6. Verification and validation

Never visually verify the success of the installation. Use the Chrome browser extension called Meta Pixel Helper.

Once the page loads, the extension icon should turn blue. When you click on it, you should see a PageView event and a green check mark next to your Pixel ID. If you get an error message, check if your browser is blocking tracking codes (e.g. AdBlock) or if you have cleared your server-side cache.

DO YOU NEED HELP?

If you are stuck with the setup or need professional help with the technical optimization of your website, Search with confidence on orkenyi.hu!