facebook/capi-param-builder-php
Purchase or AddToCart events with required fields (e.g., value, currency, content_ids).Lead events include first_name, last_name, and email with proper formatting.data_processing_options, test_event_code).Adopt if:
Look elsewhere if:
PageView with no custom data).For Executives: *"This is a turnkey solution to fix a critical pain point: invalid Conversions API events. Meta rejects ~10–20% of custom events due to parameter errors, costing us in ad spend and lost attribution data. By adopting Facebook’s PHP parameter builder SDK, we’ll:
For Engineering: *"This is a lightweight, battle-tested library that handles the tedious work of validating CAPI events for us. Key benefits:
Purchase include required fields (e.g., value, currency) with correct types.data_processing_options).composer require facebook/capi-param-builder-php.
Implementation: Drop this into your event service layer—it’ll validate payloads before they hit Meta’s API. Example:use Facebook\Capi\ParamBuilder\ParamBuilder;
$builder = new ParamBuilder();
$event = $builder->buildEvent('Purchase', [
'value' => 99.99,
'currency' => 'USD',
'content_ids' => ['12345'],
]);
// $event is now a validated array ready for CAPI.
Tradeoff: We cede minimal control over parameter formatting, but gain compliance and reliability out of the box."*
How can I help you explore Laravel packages today?