Skip to content

conversion_bridge_meta_api_event_type

Description

The conversion_bridge_meta_api_event_type filter allows you to change the event type name sent to the Meta Conversions API (CAPI) before the server-side request is made. This runs after Conversion Bridge has mapped the internal event type to Meta's event name (e.g., form_submitLead, purchasePurchase).

This is the server-side counterpart to conversion_bridge_meta_event_type. When you change event types, you typically want to apply the same change to both the Pixel and the Conversions API so they stay in sync for deduplication.

Usage

add_filter( 'conversion_bridge_meta_api_event_type', 'my_hook_function', 10, 2 );
add_filter( 'conversion_bridge_meta_api_event_type', 'my_hook_function', 10, 2 );

Parameters

  1. $event_type (string) The Meta event type name after Conversion Bridge's mapping (e.g., Lead, Purchase, ViewContent)
  2. $data (array) The original event data array from Conversion Bridge, including event_type, event_url, event_id, and other tracking fields

Example

Send form submissions as custom_form_submit instead of Meta's standard Lead event via the Conversions API. Use this alongside the conversion_bridge_meta_event_type filter to keep Pixel and CAPI events consistent:

add_filter(
    'conversion_bridge_meta_api_event_type',
    function( $event_type, $data ) {

        if ( 'Lead' === $event_type ) {
            return 'custom_form_submit';
        }

        return $event_type;
    },
    10,
    2
);
add_filter(
    'conversion_bridge_meta_api_event_type',
    function( $event_type, $data ) {

        if ( 'Lead' === $event_type ) {
            return 'custom_form_submit';
        }

        return $event_type;
    },
    10,
    2
);

Still need help?

If you have not yet found your answer in the documentation articles, please contact support

Contact support