Meta Pixel (Browser & Conversions API)
Meta Pixel provides integrated browser-side and server-side tracking for Meta (Facebook) Pixel, combining event tracking and Conversions API capabilities. It supports core and e-commerce events, offers multiple user identifiers, and allows for custom event creation through a plugin system.
Meta Pixel provides comprehensive Meta (Facebook) Pixel tracking for Drupal 10+ with both browser-side and server-side (Conversions API) event tracking capabilities.
This module was created to address integration challenges when combining the existing facebook_pixel and meta_conversions_api modules. It borrows from what were the best parts of these two modules and brings them together in a cohesive implementation supporting both tracking methods simultaneously with proper event deduplication. It also borrows on google_tag's approach to adding events using plugins, so developers can easily create their own plugins for custom events.
Supported Events
Core Events:
- PageView
- CompleteRegistration (user account creation)
- ViewContent (node tracking)
Commerce Events (meta_pixel_commerce submodule):
- ViewContent (product/variation viewing with AJAX variation changes)
- AddToCart
- InitiateCheckout
- AddPaymentInfo
- Purchase
Key Features
- Dual Tracking Methods: Browser-side JavaScript (fbq) and server-side Conversions API with event deduplication support
- Plugin-Based Event System: Extensible event architecture allowing custom event types via plugins
- Commerce Integration: E-commerce event tracking via meta_pixel_commerce submodule (AddToCart, Purchase, InitiateCheckout, AddPaymentInfo, ViewContent)
- Multiple User Identifiers: Collects emails, phones, and address data from account, billing, and shipping sources
- Server-Side Alternative: CAPI provides tracking option when browser-based methods are unavailable
- Privacy Controls: EU Cookie Compliance integration, Do Not Track respect, advanced matching toggles
See the README file for configuration instructions and how to add custom events.
Requirements
- Drupal 10 or 11
- For Commerce features: Commerce module
- For server-side tracking: Facebook PHP Business SDK (installed via Composer)
This is still very new and and in the early stages. So things will probably change as I test it out. But I figured I would put it out there In case anyone likes this approach and wants to help. Patches and suggestions are welcome.
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
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.0-alpha2 | Pre-release | 10–11 | Jul 13, 2026 | ||
| 1.0.0-alpha1 | Pre-release | 10–11 | First alpha release | Dec 21, 2025 | |
| 1.0.x-dev | Dev | 10–11 | Initial dev release | Nov 21, 2025 |