How to set up ViewContent event correctly both client-side and server-side?
1

Hi,

For a client we manage implementations of marketing tags we have this client-side implementation that sends over the contents of the client-side pixel in the following manner (for quite some time):

content_type: product contents: [{"id":"1234","quantity":1,"name":"product a","price":"123.9"},{"id":"4321","quantity":1,"name":"product b","price":"12.49"},{"id":"12345|products-combined","quantity":1}]

Now this seemingly was working as expected, but with the introduction of the server-side conversion API we aim to send over the the same payload as client-side, server-side. But revisiting the documentation and payload helper we have doubts about this setup:

Definition on https://developers.facebook.com/docs/meta-pixel/reference/ An array of JSON objects that contains the quantity and the International Article Number (EAN) when applicable, or other product or content identifier(s). id and quantity are the required fields. e.g. [{'id': 'ABC123', 'quantity': 2}, {'id': 'XYZ789', 'quantity': 2}].

When trying our payload within the Payload helper we get an error/warning https://developers.facebook.com/docs/marketing-api/conversions-api/payload-helper Unexpected key "name" on param "data['custom_data']['contents'][0]"

So the first main question is how severe this error is, or if the 'name' key can be used to any value when providing it like this?

Secondly, now that we have to set it up server-side through Tealium CDP EventStream we run into the challenge that in that platform it only allows IDs, Quantity, Prices to be set via the 'contents' variable. Now we can send another custom variable with the names. This does lead to the payloads differing between payloads client- and server-side, so is that an issue? Plus again the question whether it has any value to send the contents in a different way than is expected by the Facebook documentation?

Hope the above is clear, otherwise, please leave some question for clarification.

Many thanks, Stef

Stef
Asked about 3 months ago