Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Możesz zastosować rabat na produkt w zdarzeniu e-commerce, dodając parametr
discount z wartością rabatu. Nie używaj wartości procentowej
z parametrem discount.
Przykład
Sklep internetowy kosztuje 6 zł za parę skarpetek. Klient kupuje 3 pary
ze zniżką 2 USD za parę. W tym przykładzie tag zdarzenia purchase
będzie wyglądać tak:
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},]});
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]