对电子商务事件应用折扣

您可以通过添加 discount 参数并设定折扣值,对电子商务事件中的商品应用折扣。请勿使用百分比值 使用 discount 参数指定折扣。


<ph type="x-smartling-placeholder"></ph>

示例

一家网店每双袜子卖 $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
    },
]
});

报告折扣

通过以下维度和指标,您可以报告折扣:

维度或指标 说明
商品优惠券 用于购买商品(例如您销售的产品)的优惠券。
订单优惠券 您为折扣商品指定的优惠券名称或代码。
商品收入 仅商品带来的总收入(不含税费和运费)。商品收入 = quantity x price

如果您想要应用事件级折扣,则必须创建自己的自定义指标才能报告事件级折扣。