Created
July 30, 2025 16:24
-
-
Save Samox/f3c55bd19134e7fac88d962b9ae8e10a to your computer and use it in GitHub Desktop.
Revisions
-
Samox created this gist
Jul 30, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ export class MySuperwallDelegate extends SuperwallDelegate { handleSuperwallEvent(eventInfo: SuperwallEventInfo) { switch (eventInfo.event.type) { case EventType.transactionComplete: const product = eventInfo.event.product; const transaction = eventInfo.event.transaction; if (product && transaction) { console.info("product", product); console.info("transaction", transaction); trackPlatformPurchase({ price: product.price, currency: product.currencyCode!, transactionId: transaction.originalTransactionIdentifier || undefined, sku: product.productIdentifier, orderId: transaction.storeTransactionId || undefined, signature: undefined, purchaseToken: undefined, }); const subscription = new AdjustAppStoreSubscription( String(product.price), product.currencyCode, transaction.originalTransactionIdentifier, ); Adjust.trackAppStoreSubscription(subscription); } break; default: break; } } }