Stay organized with collections
Save and categorize content based on your preferences.
You can apply a discount to an item in an ecommerce event by adding the
discount parameter with the value of the discount. Don't use the percentage
discount with the discount parameter.
Example
An online store charges $6 per pair of socks. A customer purchases 3 pairs of
socks with a $2 discount per pair. In this example, the purchase event tag
would look like the following:
[null,null,["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eUse the \u003ccode\u003ediscount\u003c/code\u003e parameter to apply discounts to items in ecommerce events, representing the total discount amount, not the percentage.\u003c/p\u003e\n"],["\u003cp\u003eThe example demonstrates applying a per-item discount during a purchase event using the \u003ccode\u003ediscount\u003c/code\u003e parameter in gtag.js.\u003c/p\u003e\n"],["\u003cp\u003eReporting on discounts is possible using dimensions like \u003ccode\u003eitem_coupon\u003c/code\u003e, \u003ccode\u003eorder_coupon\u003c/code\u003e, and metrics like \u003ccode\u003eitem_revenue\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eFor event-level discounts, create a custom metric to track and report them separately.\u003c/p\u003e\n"]]],["To apply a discount to an item in an ecommerce event, add the `discount` parameter, using the discount value, not a percentage. For instance, if a customer buys three pairs of socks at $6 each with a $2 discount per pair, the `purchase` event tag reflects this. Reports can use \"Item coupon,\" \"Order coupon,\" and \"Item revenue\" to track these discounts. For event-level discounts, custom metrics are needed.\n"],null,["# Apply a discount to an ecommerce event\n\nYou can apply a discount to an item in an [ecommerce event](/analytics/devguides/collection/ga4/ecommerce) by adding the\n`discount` parameter with the value of the discount. Don't use the percentage\ndiscount with the `discount` parameter.\n\n\u003cbr /\u003e\n\n\ngtag.js Tag Manager\n\nExample\n-------\n\nAn online store charges $6 per pair of socks. A customer purchases 3 pairs of\nsocks with a $2 discount per pair. In this example, the `purchase` event tag\nwould look like the following:\n\nReport on the discount\n----------------------\n\nThe following [dimensions and metrics](https://support.google.com/analytics/answer/9143382) allow you to [report](https://support.google.com/analytics/answer/9212670) on discount:\n\n| Dimension or metric | Description |\n|---------------------|-----------------------------------------------------------------------------------------------------|\n| Item coupon | The coupon used to purchase an item (e.g., a product you sell). |\n| Order coupon | The coupon name or code that you specify for discounted items. |\n| Item revenue | The total revenue from items only, excluding tax and shipping. Item revenue = `quantity` x `price`. |\n\nIf you want to apply event-level discounts, you must create your own custom\nmetric to report on event-level discounts."]]