Stape Shopify App - Send Test Webhook - Refund - 400 Status Code

Hey there!

I’m looking to send refund events to GA4 from Shopify and I have implemented Stape sGTM for GA4 on a pro account.

When I activate webhooks (I only want to use it for refunds), save and Send a test webhook - i get an empty/400 status request showing in my server GTM preview (manual requests enabled in powerups)

Could you please check and see if I’m doing something wrong and if this is a correct way to implement refund events for shopify with Stape.

This is what i see in preview:

Thanks in advance for your help!

and this is what i have in the app:

Update: it looks like my setup wasn’t complete as I didn’t configure the Data Client for the sGTM to claim the webhook requests. I’ve done it now and I can see those events coming through correctly:

Can you please point me to the info on setting up Refund event (if there’s any)

  • do i just set up a GA4 event tag in sGTM and send it to GA4 via measurement ID ?
  • and setup variables to populate parameters of the event based on the event data that comes through via webhook ?

Also for some reason I see both purchase and refund requests although i have only refund enabled in the app. I the purchase event is sent via webhook would it impact the normal ecommerce event i send from web GTM?

Is your Data Client configured to receive requests to /webhook?

A 400 response means that no client has processed the request.

You need to configure, for example, Data Client to receive and handle these webhooks:

Hi @Alex - thanks for your reply! All good here - we configured the Data client after my original posts so we are handling these webhooks correctly now and it’s tracking a high percentage of orders.

Now we’ll need to tackle the “Unassigned / not set” issue resulting from these webhooks - I’m looking at your resources/articles + comments in the community on this topic. I wonder if you have any new info/solutions/recommendations for that?

Our situation is that ~50% of orders come through as Unassigned/not set - that would be around the same number of orders we receive purely from webhook (we send all events ss, use custom loader / cookie extender + we disconnected GA4 in Google & Youtube app) the only requests that are sent to google directly are Consent pings like that - can this be an issue?

https://analytics.google.com/g/s/collect?dma=0&npa=0&gcs=G111&gcd=...&gtm=...&_gsid=GVRHS6YKQMwSKcRn79Yz5PfY86XIYujw

Most likely, this means that the events you are sending via webhooks contain incorrect client ID and session ID (or not contain them at all). In other words, they are not the same as those used by the online user, and because of this, the webhook event is not linked to any user or session.

1 Like