Files
overleaf-cep/services/web/types
Rebeka Dekany 5c61ea53d5 Include Stripe couponCode and promotionCode in analytics events (#29873)
* Include valid couponCode and promotionCode in `payment-page-view` and `payment-page-form-submit` analytics events

* Update payment event types

* Remove obsolete comment

* fix: only send validated coupon and promotion codes in analytics event

* Add coupon name for the analytics events

* Update test to include the coupon name for analytics

* Remove coupon code from analytics

* Simplify promotion code validation using coupon.code

* Remove undefined

* Allow access to promotion code

* Remove `lastValidatedPromotionCode` and compare against coupon code from the preview response

* Fix test setup to initialize coupon code

* Keep the submit button enabled only when the coupon code is either empty or successfully validated by the backend

* Update test coupon code value to TEST_COUPON

GitOrigin-RevId: b12fa147d91fd3b90b59bc77868a0786ddb633b7
2026-01-08 09:05:27 +00:00
..