Skip to main content
Question

Sending purchase amount to TelemetryDeck

  • 6 July 2024
  • 1 reply
  • 19 views

Forum|alt.badge.img

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?
 

This post has been closed for comments

1 reply

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • July 10, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings