How to add the Meta Pixel and Google Analytics with Elementor Pro

Add tracking codes such as the Meta Pixel and Google Analytics 4 site-wide with Elementor Pro's Custom Code screen, and check that they fire.

Updated 20 October 2026 · Written by AI Web Tools

Short answer

Elementor Pro has a Custom Code screen (Elementor › Custom Code) where you paste a tracking snippet once, choose where it loads (head, start of body or end of body) and on which pages. That covers the Meta Pixel base code and the Google Analytics 4 tag without an extra plugin. After publishing, check in each platform's own test tool that the code fires.

Step by step

  1. Copy the base code from Meta Events Manager or from your Google Analytics data stream.
  2. In WordPress, go to Elementor › Custom Code › Add New. Give it a clear name such as "GA4 base tag".
  3. Paste the code, set Location to <head>, and publish with the condition "Entire site".
  4. Open your site in a private window and use Meta's test events or Google's real-time report to confirm hits arrive.

Counting leads

The simplest conversion to measure is a thank-you page. Make your form redirect to it, and count views of that page as a lead in Meta and Google. Add a second Custom Code snippet limited to the thank-you page if a platform needs an event call there.

Privacy and speed

  • Load only the tags you actually use. Every tag adds weight to every page.
  • Tell visitors in your privacy notice which tracking tools you use.
  • If a cookie-consent plugin manages tags, add the codes through it instead, so they respect consent.

Sources

Prices and features change. Check the source before you buy; we update this guide when they do.

Questions people ask

Still unsure? Message us on WhatsApp.

Is Custom Code in free Elementor?

No. The Custom Code screen is an Elementor Pro feature. On free, use a header-and-footer code plugin.

Can I add the code to one page only?

Yes. Set the snippet's display condition to that page.

Why do I see double events?

The same tag is probably installed twice, once in Custom Code and once in a plugin or theme setting. Keep one.

Ready to go Pro?

Message us on WhatsApp and get activated today.