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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

weseze created an issue. See original summary.

rob230’s picture

You are right that event_id is optional, I will update this.

  • rob230 committed a6cc15c7 on 1.x
    [#3444393] fix: "Missing event_id or event_name in Meta request, called...
rob230’s picture

Status: Active » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.