Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Facebook Pixel

Security covered Maintenance fixes only 6,606 sites

This module allows you to integrate the Facebook Pixel into your Drupal site to track user activity and conversions. It supports common events like viewing content, completing registrations, adding to cart, initiating checkout, and purchases, with the latter three integrated with Drupal Commerce.

Integrates the Meta Pixel (formerly Facebook Pixel) with Drupal to report conversions, build audiences and understand how visitors use your site.
Starting with 3.x, events can also be sent server-side through the Meta Conversions API (CAPI).

Features

  • Browser pixel and server-side CAPI tracking, with automatic event deduplication
  • Client-side and server-side tracking can be switched on separately for each event: PageView, ViewContent, CompleteRegistration and Commerce events (AddToCart, InitiateCheckout, Purchase)
  • Cache-safe PageView tracking, so pages stay cacheable for anonymous users
  • "Event Emitter" block and ViewContent pseudo-field
  • Consent management through the Klaro! submodule
  • Optional Parameter Builder support for better CAPI match quality
  • Plugin-based event system for adding custom events

For event types, parameters and Events Manager setup, see Meta's documentation.

Consent management (Klaro!)

3.x includes the new facebook_pixel_klaro submodule, which integrates with Klaro! Cookie & Consent Management. It blocks both the browser pixel and server-side Conversions API events until the visitor has given consent. This matters because server-side requests don't pass through the browser, so client-side script blocking alone can't stop them.

To use it, install and configure Klaro!, then enable the submodule. If you use a different consent solution, you must make sure yourself that no tracking, client- or server-side, happens without valid consent.

Versions

  • 3.x (Drupal 11): A complete rewrite, based on and merged with Meta Pixel by @loze. Thank you! It adds server-side tracking (CAPI), consent integration and a new plugin-based event system. See the 3.0.0-alpha1 release notes. Please test carefully before upgrading from 2.x.
  • 2.x (Drupal 10/11): Stable, client-side pixel only, receives maintenance fixes only.

Similar projects

Disclaimer

This is free, open source software, licensed under the GPL and provided "as is", without warranty of any kind. Tracking users and sharing their data with Meta affects their privacy. You alone are responsible for using this module in compliance with all applicable laws (e.g. GDPR, ePrivacy, CCPA). That includes obtaining valid consent where required and disclosing the tracking in your privacy policy.

Drupal 10–11

Ask your assistant about Facebook Pixel

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Nov 2023
Latest release
1 week ago
Releases (12 mo)
2 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
3.0.0-alpha1 Pre-release 11 Sep 28, 2026
3.x-dev Dev 11 Sep 28, 2026
2.0.1 Stable 10–11 Oct 16, 2024
2.0.0 Stable 10–11 Aug 21, 2024
2.0.0-rc7 Pre-release 10 Jun 28, 2024
2.0.0-rc6 Pre-release 10 Jun 18, 2024
2.0.0-rc5 Pre-release 8–10 Nov 9, 2023