Analytics and Tracking

Coupon

Also called discount code parameter, promo code

A text parameter recording which discount code was applied to an order or to an individual item.

Quick facts: Coupon

Category
Analytics and Tracking
Also called
discount code parameter, promo code
Level
Beginner
Affects
Promotion reporting, margin analysis, influencer measurement
Where to see it
GA4 ecommerce reports, GA4 DebugView, shop platform discount settings
In this article4
  1. What the coupon parameter records
  2. Why it matters
  3. Where coupon tracking goes wrong
  4. How to act on it

What the coupon parameter records

When a shopper types a discount code at checkout, ecommerce tracking can carry that code through with the order. The coupon parameter is simply a text field holding the code that was applied — WELCOME, DASHAIN, whatever your shop calls it — attached to the purchase so it appears in reporting later.

It can sit at two levels. Applied to the order, it says which code discounted the basket as a whole. Applied inside the item array, it says which code discounted a particular product, which matters when a promotion covers one range and not another. Most shops only need the order-level version, and sending both without a reason just makes reports harder to read.

What the parameter does not do is change any money. It is a label, not an instruction. The value you send with the purchase is still whatever your code calculates, so if you want revenue to reflect the discount, the discount must already be subtracted before the value is sent.

Why it matters

Discount codes are one of the few marketing levers whose cost is exact and known. Recording the code turns a promotion from a guess into something measurable: how many orders used it, what those orders were worth, whether the buyers were new or returning, and whether the campaign that promoted it brought anyone who would not have bought anyway.

It also exposes leakage. Codes issued for one audience travel — into coupon aggregator sites, group chats, staff and family. Without the parameter you cannot tell an influencer’s genuine audience from strangers who found the code online, and you will keep paying for reach you never received.

Where coupon tracking goes wrong

Inconsistent naming ruins it fastest. The same promotion issued as dashain, Dashain and DASHAINSALE arrives as separate rows that nobody thinks to add together. Codes named after nothing in particular are just as bad: a report full of unexplained strings tells you which was used but never why it existed.

The second problem is scope confusion. Sending an order-level code onto every item makes each product look discounted when only one was, and the item-level revenue no longer reconciles with the order. The third is silence: many platforms and plugins simply do not populate the field, so teams assume there were no discounts when in truth nothing was ever recorded.

How to act on it

Agree a naming convention before the next promotion, not after. Something readable that encodes the campaign and the channel is enough, applied in one case so the codes group cleanly, and stored in a shared list so anyone reading a report can look up what a code was for.

Then check it works. Place a test order with a code applied and confirm the value arrives in the purchase event exactly as typed. Once the data is flowing, judge promotions on what the discounted orders were worth against what the discount cost, rather than on order count alone. A code that fills the shop with unprofitable baskets is not a success, and this parameter is what lets you prove it.

Do and do not

Do

  • Agree a readable naming convention before issuing codes
  • Subtract the discount from the value you send
  • Keep a shared list linking each code to its campaign

Do not

  • Issue the same promotion under several spellings
  • Copy an order-level code onto every item in the basket
  • Judge a promotion on order count alone

Questions people ask about this

Does the coupon parameter reduce the revenue analytics records?

No. It only records which code was used. The revenue figure comes from the value your site sends with the purchase event, so the discount must already be deducted there if you want reports to show the amount actually charged. Sending the code and the full undiscounted value together is a common and confusing mistake.

Can I see which campaign a discount code came from?

Only if the code itself tells you, or you keep a list linking codes to campaigns. The parameter stores plain text with no link back to a source, so a readable naming convention is what turns it into useful reporting. Combine it with campaign tracking on the visit for a fuller picture of where the order began.

Should I send the coupon at order level or item level?

Order level suits most shops, because a single code usually discounts the whole basket. Use item level only when a promotion applies to specific products and you genuinely need per-product analysis. Copying an order-level code onto every item makes untouched products look discounted and breaks reconciliation between item revenue and the order total.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.