할인 가격과 함께 discount 매개변수를 추가하여 전자상거래 이벤트의 상품에 할인을 적용할 수 있습니다. discount 매개변수를 사용할 때는 할인율(%)을 사용하지 마세요.
예
양말 한 켤레를 6달러에 판매하는 온라인 상점에서 고객이 양말 3켤레를 구매하면 한 켤레에 2달러씩 할인해 준다고 할 때 purchase 이벤트 태그는 다음과 같습니다.
gtag("event","purchase",{ transaction_id:"T_12345", coupon:"socksSale", value:12.00,// value = quantity x sale price currency:"USD",// The currency of the value, discount, and price items:[ { item_id:"SKU_12345", item_name:"Socks", discount:2.00,// The discount per item price:4.00,// The sale price is the per item list price (6.00) minus discount (2.00) quantity:3// The number of items sold }, ] });
[null,null,["최종 업데이트: 2024-09-13(UTC)"],[[["Use the `discount` parameter to apply discounts to items in ecommerce events, representing the total discount amount, not the percentage."],["The example demonstrates applying a per-item discount during a purchase event using the `discount` parameter in gtag.js."],["Reporting on discounts is possible using dimensions like `item_coupon`, `order_coupon`, and metrics like `item_revenue`."],["For event-level discounts, create a custom metric to track and report them separately."]]],["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"]]