Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Anda dapat menerapkan diskon ke item dalam peristiwa e-commerce dengan menambahkan parameter discount bersama nilai diskon. Jangan gunakan persentase
diskon dengan parameter discount.
Contoh
Sebuah toko online mengenakan biaya $6 untuk sepasang kaus kaki. Pelanggan membeli 3 pasang kaus kaki dengan diskon $2 untuk sepasang kaus kaki. Dalam contoh ini, tag peristiwa purchase akan terlihat seperti berikut:
gtag("event","purchase",{transaction_id:"T_12345",coupon:"socksSale",value:12.00,// value = quantity x sale pricecurrency:"USD",// The currency of the value, discount, and priceitems:[{item_id:"SKU_12345",item_name:"Socks",discount:2.00,// The discount per itemprice:4.00,// The sale price is the per item list price (6.00) minus discount (2.00)quantity:3// The number of items sold},]});
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-10-09 UTC."],[],["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"]]