"Missing event_id or event_name in Meta request, called from ..." is confusing

Created on 30 April 2024, 8 months ago

We have a custom event setup for a webform.
It only sends the event_name along with some data.

Following the official API documentation, this is a valid request: https://developers.facebook.com/docs/marketing-api/conversions-api/param...

However we get the error message "Missing event_id or event_name in Meta request, called from ....".
This is very confusing as the message indicated either of these is required, but the logic requires them both.

    if (empty($eventData['event_id']) || empty($eventData['event_name'])) {
      $this->logger->error('Missing event_id or event_name in Meta request, called from ' . debug_backtrace(!DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1]['function']);
      return;
    }

I suggest to either change the error message and add documentation if this is a requirement for this module to work correctly.
Or, per the official Meta conversion API documentation, only require event_name and make event_id optional.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium weseze

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024