החלת הנחה על אירוע של מסחר אלקטרוני
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אפשר להחיל הנחה על פריט באירוע מסחר אלקטרוני. כדי לעשות את זה, מוסיפים את הקוד:
discount עם ערך ההנחה. אני לא רוצה להשתמש באחוזים
הנחה עם הפרמטר discount.
דוגמה
החנות הווירטואלית גובה 6 $על כל זוג גרביים. לקוח רוכש 3 זוגות של
גרביים בהנחה של 8 ש"ח לכל זוג. בדוגמה הזו, תג האירוע purchase
ייראה כך:
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},]});
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 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"]]