Áp dụng chiết khấu cho một sự kiện thương mại điện tử
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Bạn có thể áp dụng chiết khấu cho một mặt hàng trong sự kiện thương mại điện tử bằng cách thêm thông số discount có giá trị của khoản chiết khấu. Không sử dụng tỷ lệ phần trăm
giảm giá bằng thông số discount.
Ví dụ:
Một cửa hàng trực tuyến tính phí 6 USD cho mỗi đôi tất. Một khách hàng mua 3 đôi
tất được giảm giá 2 đô la/đôi. Trong ví dụ này, thẻ sự kiện purchase sẽ có dạng như sau:
[null,null,["Cập nhật lần gần đây nhất: 2024-09-13 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."]]