conversion_bridge_ga4_event_type
Description
The conversion_bridge_ga4_event_type filter allows you to change the event name used in the gtag("event", ...) call before GA4 renders it. This runs after Conversion Bridge has mapped the internal event type to GA4's event name (e.g., register → sign_up, booking → purchase).
Use this to rename events, consolidate multiple event types into one, or send custom event names to GA4.
Usage
add_filter( 'conversion_bridge_ga4_event_type', 'my_hook_function', 10, 2 );
add_filter( 'conversion_bridge_ga4_event_type', 'my_hook_function', 10, 2 );
Parameters
$event_type(string) The GA4 event name after Conversion Bridge's mapping (e.g.,form_submit,purchase,sign_up)$event(array) The original event data array from Conversion Bridge
Example
Rename form_submit to generate_lead so form submissions show up as GA4's recommended generate_lead event instead of a custom event:
add_filter(
'conversion_bridge_ga4_event_type',
function( $event_type, $event ) {
if ( 'form_submit' === $event_type ) {
return 'generate_lead';
}
return $event_type;
},
10,
2
);
add_filter(
'conversion_bridge_ga4_event_type',
function( $event_type, $event ) {
if ( 'form_submit' === $event_type ) {
return 'generate_lead';
}
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