Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Meta Conversions API

191 sites No security coverage
View on drupal.org

This module integrates your Drupal site with the Meta Conversions API. It allows you to send events like PageViews to Meta, with options to enable/disable specific events and integrate with consent management systems.

Allows integrating with Meta Conversions API.

Features

  • Out of the box comes with a PageView event.
  • Allows enabling/disabling each event and declaring new events.
  • Uses hooks to control event triggering, for integration with cookie banners.

Post-Installation

  1. Use composer to require the module and make sure facebook/php-business-sdk has also been installed.
  2. Go to the settings page and enter the Access Token and Pixel ID from Facebook.

Additional Requirements

Uses Facebook's PHP Business SDK.

Usage

Consent

To require consent, you must implement hook_meta_conversions_api_allowed() (for example, checking a cookie).

It is also recommended to override the Drupal.meta_conversions_api.allowedCallback function in your own JavaScript library, as this will avoid unnecessarily making requests to the server.

Adding events

You can implement hook_meta_conversions_api_event_names() to add your own events. This is only necessary if you intend on making it possible to disable the event.

You can rename existing events with hook_meta_conversions_api_event_names_alter().

You can send your own events with the sendRequest() method of the MetaClient service.

Activity

Total releases
2
First release
Oct 2025
Latest release
9 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.1.x-dev Dev Oct 4, 2025
1.1.0 Stable Oct 3, 2025