Shopify Data Client: How to Access app_id from Webhook Payload?

Hi folks,

I’m implementing Shopify webhook purchase tracking and am trying to use the Shopify app_id to identify the Sales Channel (Online Store, Shop, TikTok, Draft Orders, Subscriptions, etc.).

My goal is to enrich the GA4 Purchase event with a shopify_sales_channel parameter (and potentially filter which purchases are sent to advertising platforms). This would also help distinguish purchases that currently end up as Unassigned in GA4 because they originate outside the Online Store (e.g. subscriptions, Shop, TikTok, Draft Orders).

In the standard Shopify orders/create webhook, app_id is included in the payload. For example:

However, I’m using the Stape Data Client to claim Shopify webhooks, and it appears that the payload exposed by the client is heavily trimmed and doesn’t include app_id.

Does anyone know if there’s a way to access the original app_id within the Stape Data Client, or is creating a custom client currently the only option?

@Dan @Alex I’d really appreciate your thoughts.

Thanks!

looks like you can use source_name for that exact purpose :slightly_smiling_face:

Hi Anton,

It seems to me that you’re relying on the webhooks sent by the Stape Conversion Tracking app, rather than native Shopify webhooks or webhooks from Flow.

Data Client does not trim the payload of webhooks, and the app_id is available in the event data when a native Shopify webhook is received by Data Client.

Thanks @Dmytro ! :folded_hands: I’ll try that! For now I configured a mapping that’s based on the source_name parameter in the Stape app webhook (trimmed version of the native shopify webhook payload)