setVariationId method
In Observer mode, Adapty SDK doesn’t know, where the purchase was made from. If you display products using our Paywalls or A/B Tests, you can manually assign variation to the purchase. After doing this, you’ll be able to see metrics in Adapty Dashboard.
Parameters:
variationId
: A string identifier of variation. You can get it using variationId property of AdaptyPaywall.transactionId
: A string identifier of your purchased transaction SKPaymentTransaction for iOS or string identifier (purchase.getOrderId()
) of the purchase, where the purchase is an instance of the billing library Purchase class for Android.
Implementation
Future<void> setVariationId(String transactionId, String variationId) {
return _invokeMethodHandlingErrors<void>(Method.setTransactionVariationId, {
Argument.transactionId: transactionId,
Argument.variationId: variationId,
});
}