Thank you Alek
I tried several plugins and none of them has a proper implementation of refund.
My question was which parameters is sending during refund event.
Both for full refund and partial refund.
“The refund event in GA4 is used to track when a customer returns a product or service. This event can be sent using the ec:refund
action and it requires the following parameters:
id
: The ID of the transaction being refunded.
revenue
/value: The amount of the refund.
If you are not seeing the refund amount populated in your GA4 reports, there are a few possible reasons:
- You have not sent the refund event using the
ec:refund
action.
- You have not included the
revenue
/value parameter in your refund event.
- The refund event has not been processed by GA4 yet.
To troubleshoot this issue, you can use the Google Analytics Debugger to see if the refund event is being sent correctly. You can also check the status of your refund event in the GA4 Data Import queue.
Here are some additional tips for tracking refunds in GA4:
- Make sure that you are sending the refund event as soon as the refund is processed.
- Use the
transactionId
parameter to link the refund event to the original purchase transaction.
- Use the
revenue
/value parameter to track the amount of the refund.
- Use custom dimensions and metrics to track additional information about your refunds, such as the reason for the refund or the product(s) being refunded.
Once you have verified that you are sending the refund event correctly, it may take some time for the refund amount to populate in your GA4 reports. This is because GA4 needs to process the event and calculate the updated revenue metrics.
If you are still having problems with the refund amount not populating in your GA4 reports, you can contact Google Analytics support for assistance.
const measurementId =
G-XXXXXXXXXX
;const apiSecret = <secret_value>
;fetch(https://www.google-analytics.com/mp/collect?measurement_id=${measurementId}&api_secret=${apiSecret}
, { method: "POST", body: JSON.stringify({ "client_id": "client_id", "events": [{ "name": "refund", "params": { "currency": "USD", "transaction_id": "T_12345", "value": 12.21, "coupon": "SUMMER_FUN", "shipping": 3.33, "tax": 1.11, "items": [ { "item_id": "SKU_12345", "item_name": "Stan and Friends Tee", "affiliation": "Google Merchandise Store", "coupon": "SUMMER_FUN", "currency": "USD", "discount": 2.22, "index": 0, "item_brand": "Google", "item_category": "Apparel", "item_category2": "Adult", "item_category3": "Shirts", "item_category4": "Crew", "item_category5": "Short sleeve", "item_list_id": "related_products", "item_list_name": "Related Products", "item_variant": "green", "location_id": "ChIJIQBpAG2ahYAR_6128GcTUEo", "price": 9.99, "quantity": 1 } ] } }] })});
https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events?hl=en