Question

Sending purchase amount to TelemetryDeck

  • 6 July 2024
  • 1 reply
  • 5 views

Badge

I would like to send the purchase amount to the Telemetry Deck analytics provider which I am using in my SwiftUI app. For example:
 

					.presentPaywallIfNeeded(
requiredEntitlementIdentifier: "all_access",
purchaseCompleted: { customerInfo in
let priceValue = NSDecimalNumber(decimal: transaction.price ?? Decimal()).doubleValue

TelemetryDeck.signal("TelemetryDeck.Purchase.completed", floatValue: priceValue)
},
restoreCompleted: {
}
)

I’d like to get the transaction price, ideally I’d also like currency, term, etc. Can I get this information from CustomerInfo?
 


1 reply

Userlevel 5
Badge +9

Hi @cliff-33483,

You can get the period type from the customer info but not the price that the customer paid.

For the price you’ll either want to pull the current price from the store which is usually a pretty good proxy for the price the customer paid, or you can create a quick integration between RevenueCat and Telemetry Deck server-side with our webhooks: https://www.revenuecat.com/docs/integrations/webhooks

Reply