File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,7 @@ OBJC_EXPORT NSString *LP_PARAM_INBOX_MESSAGES;
239239OBJC_EXPORT NSString *LP_PARAM_INBOX_MESSAGE_ID;
240240OBJC_EXPORT NSString *LP_PARAM_RICH_PUSH_ENABLED;
241241OBJC_EXPORT NSString *LP_PARAM_UUID;
242+ OBJC_EXPORT NSString *LP_PARAM_CURRENCY_CODE;
242243
243244OBJC_EXPORT NSString *LP_KEY_VARS;
244245OBJC_EXPORT NSString *LP_KEY_MESSAGES;
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ - (id)init {
174174NSString *LP_PARAM_INBOX_MESSAGE_ID = @" newsfeedMessageId" ;
175175NSString *LP_PARAM_RICH_PUSH_ENABLED = @" richPushEnabled" ;
176176NSString *LP_PARAM_UUID = @" uuid" ;
177+ NSString *LP_PARAM_CURRENCY_CODE = @" currencyCode" ;
177178
178179NSString *LP_KEY_REASON = @" reason" ;
179180NSString *LP_KEY_STACK_TRACE = @" stackTrace" ;
Original file line number Diff line number Diff line change @@ -550,6 +550,13 @@ typedef NS_ENUM(NSUInteger, LPTrackScreenMode) {
550550 */
551551+ (void )trackAllAppScreensWithMode : (LPTrackScreenMode)trackScreenMode ;
552552
553+ /* *
554+ * Manually track purchase event with currency code in your application. It is advised to use
555+ * trackInAppPurchases to automatically track IAPs.
556+ */
557+ + (void )trackPurchase : (NSString *)event withValue : (double )value
558+ andCurrencyCode : (NSString *)currencyCode andParameters : (NSDictionary *)params ;
559+
553560/* *
554561 * Automatically tracks InApp purchase and does server side receipt validation.
555562 */
Original file line number Diff line number Diff line change @@ -1800,6 +1800,23 @@ + (void)trackAllAppScreensWithMode:(LPTrackScreenMode)trackScreenMode;
18001800 LP_END_TRY
18011801}
18021802
1803+ + (void )trackPurchase : (NSString *)event withValue : (double )value
1804+ andCurrencyCode : (NSString *)currencyCode andParameters : (NSDictionary *)params
1805+ {
1806+ RETURN_IF_NOOP;
1807+ LP_TRY
1808+ NSMutableDictionary *arguments = [NSMutableDictionary new ];
1809+ if (currencyCode) {
1810+ arguments[LP_PARAM_CURRENCY_CODE] = currencyCode;
1811+ }
1812+
1813+ [Leanplum track: event
1814+ withValue: value
1815+ andArgs: arguments
1816+ andParameters: params];
1817+ LP_END_TRY
1818+ }
1819+
18031820+ (void )trackInAppPurchases
18041821{
18051822 RETURN_IF_NOOP;
You can’t perform that action at this time.
0 commit comments