Skip to content

Commit

Permalink
Fixing discount code payload generation for Google Analytics (#2313)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkachel authored Jul 26, 2024
1 parent 696555a commit d5520f3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ecommerce/views/v0/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,10 @@ def _create_ga4_context(self, order):
}
if order.discounts.count() > 0:
ga_purchase_payload["coupon"] = ",".join(
[discount.discount_code for discount in order.discounts]
[
discount.redeemed_discount.discount_code
for discount in order.discounts.all()
]
)
return ga_purchase_payload

Expand Down

0 comments on commit d5520f3

Please sign in to comment.