Can we please get an update to the wixWindow.trackEvent() reference?

It seems that some key information for the use of trackEvent() is missing from the reference. For example, each of the blue links should show an example for each event parameter, but they don’t link anywhere. The only example is for “ViewContent”.

I.e for the “Purchase” event, if you use the same parameters as the example shown for “View Content”, the event won’t fire within the Facebook event testing window. It does however work for some of the other events, but right now it’s trial and error.

The information missing is that “Purchase” will only be recognised by Facebook if formatted with a “contents”: [{}] upper level on the data object like this:

wixWindow.trackEvent("Purchase", {
    "contents": [{
         "id": "12345",
         "name": "Name Here",
         "category": "Category Here",
         "price": 0, // must be numerical
         "currency": "USD",
         "brand": "Brand Here",
         "variant": "Variant Here",
         "position": 0 // null also works here

What we need is a comprehensive guide to what each event parameter should be, which parts are required/optional, the field type requirements and additional values that can be included.

Also, minor part, the "Lead’ event doesn’t take any parameters but the editor flags it as an error that says “expected 2 parameters, but got 1”.

Please and thank you!

1 Like