Event data should be passed as object

Created on 16 June 2022, over 2 years ago
Updated 16 April 2024, 6 months ago

Problem/Motivation

On facebook_pixel.js, event data are passed to fbq as is. For the purchase event such data were passed as string, resulting in errors like "Required parameter 'value' is missing for event 'Purchase'". Looking at the documentation, that should be an object.

I have updated the code to look convert the string to an object: fbq("track", event['event'], JSON.parse(event['data']));. That seems to work.

Steps to reproduce

Proposed resolution

Remaining tasks

  • Confirm that this works in all cases i.e. for other events as well.
  • Confirm whether we need to add a check to convert to object only if it is not already one i.e. in case other events are passing the data as objects.

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code (Facebook Pixel)

Created by

🇵🇪Peru krystalcode

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024