hank
2017-09-04 9a3bc82de50bb34d5719adabbbd2a74f37d8e322
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/*
 * CBAnalytics.h
 * Chartboost
 * 6.6.3
 *
 * Copyright 2011 Chartboost. All rights reserved.
 */
 
#import <StoreKit/StoreKit.h>
 
/*!
 @typedef NS_ENUM (NSUInteger, CBLevelType)
 
 @abstract
 Used with trackLevelInfo calls to describe meta information about the level value as it 
 pertains to the game's context.
 */
typedef NS_ENUM(NSUInteger, CBLevelType) {
    /*! Highest level reached */
    HIGHEST_LEVEL_REACHED = 1,
    /*! Current area level reached */
    CURRENT_AREA = 2,
    /*! Current character level reached */
    CHARACTER_LEVEL = 3,
    /*! Other sequential level reached */
    OTHER_SEQUENTIAL = 4,
    /*! Current non sequential level reached */
    OTHER_NONSEQUENTIAL = 5
};
 
/*!
 @class ChartboostAnalytics
 
 @abstract
 Provide methods to track various events for improved targeting.
 
 @discussion For more information on integrating and using the Chartboost SDK
 please visit our help site documentation at https://help.chartboost.com
 */
@interface CBAnalytics : NSObject
 
/*!
 @abstract
 Track an In App Purchase Event.
 
 @param receipt The transaction receipt used to validate the purchase.
 
 @param productTitle The localized title of the product.
 
 @param productDescription The localized description of the product.
 
 @param productPrice The price of the product.
 
 @param productCurrency The localized currency of the product.
 
 @param productIdentifier The IOS identifier for the product.
 
 @discussion Tracks In App Purchases for later use with user segmentation
 and targeting.
*/
+ (void)trackInAppPurchaseEvent:(NSData *)receipt
                   productTitle:(NSString *)productTitle
             productDescription:(NSString *)productDescription
                   productPrice:(NSDecimalNumber *)productPrice
                productCurrency:(NSString *)productCurrency
              productIdentifier:(NSString *)productIdentifier;
 
/*!
 @abstract
 Track an In App Purchase Event.
 
 @param receiptString The base64 encoded receipt string used to validate the purchase.
 
 @param productTitle The localized title of the product.
 
 @param productDescription The localized description of the product.
 
 @param productPrice The price of the product.
 
 @param productCurrency The localized currency of the product.
 
 @param productIdentifier The IOS identifier for the product.
 
 @discussion Tracks In App Purchases for later use with user segmentation
 and targeting.
*/
+ (void)trackInAppPurchaseEventWithString:(NSString *)receiptString
                   productTitle:(NSString *)productTitle
             productDescription:(NSString *)productDescription
                   productPrice:(NSDecimalNumber *)productPrice
                productCurrency:(NSString *)productCurrency
              productIdentifier:(NSString *)productIdentifier;
/*!
 @abstract
 Track an In App Purchase Event.
 
 @param receipt The transaction receipt used to validate the purchase.
 
 @param product The SKProduct that was purchased.
 
 @discussion Tracks In App Purchases for later use with user segmentation
 and targeting.
 */
+ (void)trackInAppPurchaseEvent:(NSData *)receipt
                        product:(SKProduct *)product;
 
 
/*!
 @abstract
 Track level information about your user. Can be sequential levelling, non-sequential levelling, character level, or other. 
 
 @param eventLabel A string that disambiguates the eventField. Use it to provides a human readable string to answer the question - What are we tracking ?
 
 @param eventField any value from the CBLevelType enumeration. Specifies whether this event is tracking a sequential levelling, non-sequential levelling, a character level, or other.
 
 @param mainLevel integer value to be tracked that represents the main level
 
 @param subLevel integer value to be tracked that represents the sub level, 0 if no relevant sub-level
 
 @param description A string that disambiguates the mainLevel & subLevel. Use it to provide a human readable string to answer the question - What does the mainLevel number and subLevel nubmer represent in my game ?
 
 @discussion Tracks In App Purchases for later use with user segmentation
 and targeting.
 */
+ (void)trackLevelInfo:(NSString*)eventLabel
            eventField:(CBLevelType)eventField
             mainLevel:(NSUInteger)mainLevel
              subLevel:(NSUInteger)subLevel
           description:(NSString*)description;
 
/*!
 @abstract
 Track level information about your user. Can be sequential levelling, non-sequential levelling, character level, or other. 
 
 @param eventLabel A string that disambiguates the eventField. Use it to provides a human readable string to answer the question - What are we tracking ?
 
 @param eventField any value from the CBLevelType enumeration. Specifies whether this event is tracking a sequential levelling, non-sequential levelling, a character level, current area, or other.
 
 @param mainLevel integer value to be tracked that represents the main level
 
 @param description A string that disambiguates the mainLevel. Use it to provide a human readable string to answer the question - What does the mainLevel number represent in my game ?
 
 @discussion Tracks In App Purchases for later use with user segmentation
 and targeting.
 */
+ (void)trackLevelInfo:(NSString*)eventLabel
            eventField:(CBLevelType)eventField
             mainLevel:(NSUInteger)mainLevel
           description:(NSString*)description;
 
@end