How to sync refund with GA4 , how to capture return event in custom events?

Topic summary

A developer is seeking guidance on tracking refund/return events in Shopify and sending them to Google Analytics 4 (GA4).

Current Challenge:

  • Shopify’s Web Pixels API standard events documentation lacks native refund or return event support
  • The developer successfully tracks purchase events using checkout_completed subscription but needs equivalent functionality for refunds

Proposed Solution:

  • Use Shopify webhooks to capture refund events on the server side
  • Build a custom app that receives webhook data and forwards refund event payloads to GA4
  • This requires backend development work to handle the webhook-to-GA4 integration

Status: The original poster has accepted the webhook approach and requested assistance with implementation setup. The discussion remains open with implementation pending.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

https://shopify.dev/docs/api/web-pixels-api/standard-events

This document does not have return or refund event available, how to track these events and send to ga4 using custom events, like we send for purchase like this :-

analytics.subscribe(“checkout_completed”, (event) => {

gtag(“event”, “purchase”, {
transaction_id: event.data.checkout.order.id,
value: event.data.checkout.totalPrice.amount,
tax: event.data.checkout.totalTax,
shipping:event.data.checkout.shippingLine.price.amount,
currency: event.data.checkout.currencyCode,
coupon: event.data.checkout.token,
discount:event.data.checkout.discountApplications})
});

Use webhooks to receive event on the server side. Pay a developer to build a small custom app for you which will receive the webhook and send refund event payload to GA4.

I can help you set it up if you know how to code.

Yes, kindly help me with the setup