468 // MARK: - Subscription analytics
469
470 func trackSubscriptionRestored(productId: String) {
471 analytics.log("subscription_restored", ["product_id": productId])
472 }Now
…9 unchanged lines · Lines 472–480 · Hide
480 // Purchase + restore now carry language context for cohorting.
484 func trackSubscriptionPurchased(productId: String, price: Decimal, currency: String) {
485 analytics.log("subscription_purchased", [
486 "product_id": productId,
487 "price": price,
488 "currency": currency
484 func trackSubscriptionPurchased(
485 productId: String,
486 price: Decimal,
487 currency: String,
488 targetLanguage: String,
489 supportLanguage: String
490 ) {
491 analytics.log("subscription_purchased", [
492 "product_id": productId,
493 "price": price,
494 "currency": currency,
495 "target_language": targetLanguage,
496 "support_language": supportLanguage
497 ])
498 }
502 func trackSubscriptionRestored(productId: String, targetLanguage: String, supportLanguage: String) {
503 analytics.log("subscription_restored", [
504 "product_id": productId,
505 "target_language": targetLanguage,
506 "support_language": supportLanguage
507 ])
508 }