Shopify webhook line_items - how to handle for GA4?

Hi, i am getting a webhook from shopify and want to pass the items to GA4.

But the items array in the webhook looks like this (screenshot)
I need it to be correct for GA4 scheme and structure etc.

What is the best way to handle this?

There is no custom js variable on the server container, so the only option is to create your own variable that will do what you need to. When you create a custom variable there will be a link to Google doc on available methods and APIs that work in the variable code.

Thank you . Thats what i thought. You dont know if there might already be a variable or something out there already?

I think im just gonna be using Stapes webhook … its already taken care of there i see

There is unfortunately nothing ready-made here and can’t be, as it is necessary to convert your specific format to another one. So this can only be solved by creating your own variable. This is a fairly common need on a server container when working with webhooks.

2 Likes