InMobiAnalytics.h
3.33 KB
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
//
// InMobiAnalytics.h
// InMobi Monetization SDK
//
// Copyright (c) 2013 InMobi. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* This class collects analytics for a publisher's application.
*/
@interface InMobiAnalytics : NSObject
/**
* Use this method if and only if you want to manually track sessions
* This method is idempotent, meaning, if automatic track sessions is enabled
* or startSession was called before, this method does nothing.
*/
+ (void)startSessionManually;
/**
* Use this method if and only if you want to manually end sessions
* This method will also terminate automatically tracked sessions if enabled
*/
+ (void)endSessionManually;
/**
* Call this method when the user has started or re-started a section.
* @param sectionName A name string for the beginning section.
* @param additionalParams Optional NSDictionary object. This dictionary can
* have value type as (NSNumber,NSString) only.
*/
+ (void)beginSection:(NSString *)sectionName withParams:(NSDictionary *)additionalParams;
/**
* Call this method when the user has started or re-started a section.
* @param sectionName A name string for the beginning section.
*/
+ (void)beginSection:(NSString *)sectionName;
/**
* Call this method when the user has completed,failed or finished a section.
* @param sectionName A name string for the ending session.
* @param additionalParams Optional NSDictionary object. This dictionary can
* have value type as (NSNumber,NSString) only.
*/
+ (void)endSection:(NSString *)sectionName withParams:(NSDictionary *)additionalParams;
/**
* Call this method when the user has completed,failed or finished a section.
* @param sectionName A name string for the ending session.
*/
+ (void)endSection:(NSString *)sectionName;
/**
* Call this method if you want to track custom events as happening during a
* section.
* @param eventName The custom event name.
* @param additionalParams Optional NSDictionary to be provided by you.
*/
+ (void)tagEvent:(NSString *)eventName withParams:(NSDictionary *)additionalParams;
/**
* Call this method if you want to track custom events as happening during a
* section.
* @param eventName The custom event name.
*/
+ (void)tagEvent:(NSString *)eventName;
/**
* Call this method with the SKPaymentTransaction object, for manually tagging
* the transaction.
* @param skTransaction The SKPaymentTransaction object.
*/
+ (void)tagTransactionManually:(id)skTransaction;
/**
* Reports the Application Custom Goals to InMobi Ad Tracker.
* This is a non blocking API (returns immediately), and performs the
* reporting job in the background.
* When a goal is reported, it is made sure that it reaches InMobi Ad Tracker
* server whenever the device is connected to internet. Different goals can be
* reported without worrying about the internet connection.
*
* @deprecated Please start using tagEvent to manage goals
* @param goalName Your custom goal name.
*/
+ (void)reportCustomGoal:(NSString *)goalName;
/**
* This method enables publishers to add an attribute about the user or
* about anything they would like to report to.
* @param attributeValue The value of the attribute that the user wants to report.
* @param attributeName The name of the attribute that the user wants to report.
*/
+(void)setUserAttribute:(NSString*)attributeValue forName:(NSString*)attributeName;
@end