From version < 10.1 >
edited by Developer
on 2020/03/19 14:40
To version 1.1 >
edited by Admin
on 2019/12/30 10:46
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.developer
1 +xwiki:XWiki.spicyadmin
Content
... ... @@ -1,670 +1,0 @@
1 -{{box cssClass="floatinginfobox" title="**Page Contents**"}}
2 -{{toc/}}
3 -{{/box}}
4 -
5 -= 1. Overview =
6 -
7 -The plugin is located at pub repositories [[(pub repositories)>>https://pub.dev/packages/flutter_mobigate]]
8 -This plugin is built for:
9 -
10 -* Mobigate SDK version 1.0.6
11 -
12 -= 2. Adding SDK to the project =
13 -
14 -**First, add this to your package's pubspec.yaml file**
15 -
16 -{{code language=""}}
17 -dependencies:
18 - flutter_mobigate: ^1.0.2
19 -{{/code}}
20 -
21 -**Install packages from the command line**
22 -
23 -{{code language=""}}
24 -$ flutter pub get
25 -{{/code}}
26 -
27 -= 3. Api methods =
28 -
29 -To use any method from the plugin add import:
30 -
31 -{{code language="dart"}}
32 -import 'package:flutter_mobigate/flutter_mobigate.dart';
33 -{{/code}}
34 -
35 -== 3.1 MobigateSDK class initialization ==
36 -
37 -Initialize class with //MobigateSDK(MobigateOptions options)//
38 -
39 -//MobigateOptions(apiKey,{appIdentifier, appInstallationSource,email,cusUserId,enableUserFields,dataGatherPolicy,notificationText,enableIdProfiles})//
40 -
41 -{{showhide id="2" showmessage="MobigateOptions" hidemessage="MobigateOptions"}}
42 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
43 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Default|=(% style="background-color:powderblue" %)Description
44 -| appIdentifier|String| | Application identifier
45 -|appInstallationSource |String| | App installation source e.g., google-play, organic.
46 -|email |String | | Set's user email.
47 -|cusUserId |String | | You may use your custom userID for marking data. By default we are using device ID and emails for matching. Set it before starting the service using MobigateSDk.Builder method.
48 -| enableUserFields|Json Array | | Enable custom fields in user data. By default MobienceSDK is gathering all identifiers, which it can read. You can choose one of these field: ["email", "imei", "imsi", "msisdn", "mac", "serial"] see [[plugin user field constants>>https://wiki.spicymobile.pl/wiki/mobigatesdk/view/Main/sdkintegration/reactnativeintegration/#H4.1Userfieldconstants]].
49 -| dataGatherPolicy| Json Object| | Enable custom data gater policy. By default MobienceSDK gather all data it can read and hide notification icon. Check below DataGatherPolicy options for more details.
50 -| notificationText|String | | if state = Mobigate.DATA_GATHER_POLICY_DEFAULT you can pass custom foreground service notification text.
51 -| enableIdProfiles|Boolean |false | turns on / off the IDs profiles system.
52 -{{/showhide}}
53 -
54 -{{showhide id="3" showmessage="DataGatherPolicy options" hidemessage="DataGatherPolicy options"}}
55 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
56 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Default|=(% style="background-color:powderblue" %)Description
57 -| monitorState|String| | Possible monitor states: [[plugin constants>>https://wiki.spicymobile.pl/wiki/mobigatesdk/view/Main/sdkintegration/reactnativeintegration/#H4.2Datagatherpolicyconstants]]. More info about gathering data [[here>>https://wiki.spicymobile.pl/wiki/mobigatesdk/view/Main/mobigatesdkintegrationforandroiddevelopers/#H5.8Datagatherpolicy]]
58 -{{/showhide}}
59 -
60 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
61 -{{code language="dart"}}
62 - MobigateSDK mobigateInstance = MobigateSDK(MobigateOptions(
63 - "V0K6jhiIfem6CRWHYZ59Nmj3oFBBKbJsnSsWfR2JNq7ktblOUXwbJoBQTpWnw2uSwW76gpiu2kun50jweTY69B"
64 - ));
65 -{{/code}}
66 -{{/showhide}}
67 -
68 -== 3.2 SDK initialization ==
69 -
70 -You must initialize the library before running it. Use //Future<String> init// method for that:
71 -
72 -**mobigateInstance.init()**
73 -
74 -Return:
75 -
76 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
77 -|=(% style="background-color:powderblue" %)Message|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
78 -|success|String|returns success message
79 -|error|String|returns error message
80 -
81 -When the library is already initialized run it. Use //Future<String> startSdk()// method for that:
82 -
83 -**mobigateInstance.startSdk();**
84 -
85 -Return:
86 -
87 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
88 -|=(% style="background-color:powderblue" %)Message|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
89 -|success|String|returns success message
90 -|error|String|returns error message
91 -
92 -== 3.2 Tracking in app events ==
93 -
94 -In-App Events provide insight on what is happening in your app. It is recommended to take the time and define the events you would like to measure.
95 -
96 -=== 3.2.1 Overview ===
97 -
98 -An event consists of two fields that you (% style="display:none" %) (%%)can use to describe a user's interaction with your app content:
99 -
100 -(% class="table-bordered table-hover" %)
101 -|(% style="background-color:powderblue; width:200px" %)**Field name**|(% style="background-color:powderblue; width:200px" %)**Type**|(% style="background-color:powderblue; width:200px" %)**Required**|(% style="background-color:powderblue; width:200px" %)**Description**
102 -|(% style="width:200px" %)Category|(% style="width:200px" %)String|(% style="width:200px" %)yes|(% style="width:200px" %)Event category
103 -|(% style="width:200px" %)Parameter|(% style="width:200px" %)String|(% style="width:200px" %)no|(% style="width:200px" %)Event parameter. 
104 -There can be more than one
105 -
106 -You can use any event category or parameter string of your choice. However, react-native-mobigate plugin contains recommended event categories and parameters via String constants (see [[Event categories>>doc:||anchor="H3.2.3Eventcategories"]] and [[Event parameters>>doc:||anchor="H3.2.4Eventparameters"]]).
107 -
108 -=== 3.2.2 Implementation ===
109 -
110 -Tracking in-app events is performed by two methods:
111 -
112 -**Mobigate.trackEvent(options)**
113 -
114 -{{showhide id="2" showmessage="Options" hidemessage="Options" effect="slide" effectduration="0.3"}}
115 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
116 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Default|=(% style="background-color:powderblue" %)Description
117 -|name|String | | Event category name.
118 -|parameters|Json array| | Array of parameters. Look below on example.
119 -{{/showhide}}
120 -
121 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
122 -{{code language="javascript"}}
123 - sendTrackEvent = () => {
124 - if (Platform.OS === 'android') {
125 - Mobigate.trackEvent({
126 - name: Mobigate.CATEGORY_PURCHASE,
127 - parameters: {
128 - [Mobigate.PARAMETER_CONTENT_ID]: 42313532,
129 - [Mobigate.PARAMETER_PRICE]: 43.23,
130 - [Mobigate.PARAMETER_QUANTITY]: 2,
131 - 'userCustomParameterName':'simpleName'
132 - },
133 - })
134 - }
135 - }
136 -{{/code}}
137 -{{/showhide}}
138 -
139 -
140 -**Mobigate.trackAppInstall(timestamp)**
141 -
142 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
143 -|=(% style="background-color:powderblue" %)Parameter|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
144 -|timestamp|double|Unix timestamp in milliseconds
145 -
146 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
147 -{{code language="javascript"}}
148 - sendTrackEvent = () => {
149 - if (Platform.OS === 'android') {
150 - Mobigate.trackAppInstall(1578042916000)
151 - }
152 - }
153 -{{/code}}
154 -{{/showhide}}
155 -
156 -=== 3.2.3 Event categories ===
157 -
158 -The following section describes the recommended structure of each event category. In-app events categories are defined as part of plugin String constants.
159 -
160 -
161 -{{showhide id="1" showmessage="LEVEL_ACCOMPLISHED" hidemessage="LEVEL_ACCOMPLISHED" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: 0px"}}
162 -
163 -\\**Description:** Track accomplished game level achievement
164 -**Event category:** LEVEL_ACCOMPLISHED
165 -**Recommended parameters:** LEVEL, SCORE
166 -{{/showhide}}
167 -
168 -{{showhide id="2" showmessage="ADD_PAYMENT_INFO" hidemessage="ADD_PAYMENT_INFO" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
169 -
170 -\\**Description:** Track payment info
171 -**Event category:** ADD_PAYMENT_INFO
172 -**Recommended parameters:** SUCCESS
173 -{{/showhide}}
174 -
175 -{{showhide id="3" showmessage="ADD_TO_BASKET" hidemessage="ADD_TO_BASKET" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
176 -
177 -\\**Description:** Track add item to basket
178 -**Event category:** ADD_TO_BASKET
179 -**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY
180 -{{/showhide}}
181 -
182 -{{showhide id="4" showmessage="REMOVED_FROM_BASKET" hidemessage="REMOVED_FROM_BASKET" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
183 -
184 -\\**Description:** Track removed item from basket
185 -**Event category:** REMOVED_FROM_BASKET
186 -**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY
187 -{{/showhide}}
188 -
189 -{{showhide id="5" showmessage="ADD_TO_WISH_LIST" hidemessage="ADD_TO_WISH_LIST" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
190 -
191 -\\**Description:** Track add item to wish list
192 -**Event category:** ADD_TO_WISH_LIST
193 -**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY
194 -{{/showhide}}
195 -
196 -{{showhide id="6" showmessage="REGISTRATION" hidemessage="REGISTRATION" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
197 -
198 -\\**Description:** Track registration
199 -**Event category:** REGISTRATION
200 -**Recommended parameters:** REGISTRATION_METHOD
201 -{{/showhide}}
202 -
203 -{{showhide id="7" showmessage="TUTORIAL_COMPLETION" hidemessage="TUTORIAL_COMPLETION" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
204 -
205 -\\**Description:** Track tutorial completion
206 -**Event category:** TUTORIAL_COMPLETION
207 -**Recommended parameters:** SUCCESS, CONTENT, CONTENT_ID
208 -{{/showhide}}
209 -
210 -{{showhide id="8" showmessage="TRIGGER_CHECKOUT" hidemessage="TRIGGER_CHECKOUT" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
211 -
212 -\\**Description:** Track triggered checkout
213 -**Event category:** TRIGGER_CHECKOUT
214 -**Recommended parameters:** PROCE, CONTENT_TYPE, CONTENT_ID, CONTENT, QUANTITY, PAYMENT_INFO_AVAILABLE, CURRENCY
215 -{{/showhide}}
216 -
217 -{{showhide id="9" showmessage="PURCHASE" hidemessage="PURCHASE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
218 -
219 -\\**Description:** Track purchased item
220 -**Event category:** PURCHASE
221 -**Recommended parameters:** REVENUE, CONTENT_TYPE, CONTENT_ID, CONTENT, PRICE, QUANTITY, CURRENCY, ORDER_ID
222 -{{/showhide}}
223 -
224 -{{showhide id="10" showmessage="SUBSCRIBE" hidemessage="SUBSCRIBE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
225 -
226 -\\**Description:** Track subscription purchase
227 -**Event category:** SUBSCRIBE
228 -**Recommended parameters:** REVENUE, CURRENCY
229 -{{/showhide}}
230 -
231 -{{showhide id="11" showmessage="BEGIN_TRIAL" hidemessage="BEGIN_TRIAL" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
232 -
233 -\\**Description:** Track begin trail of product
234 -**Event category:** BEGIN_TRIAL
235 -**Recommended parameters:** PRICE, CURRENCY
236 -{{/showhide}}
237 -
238 -{{showhide id="12" showmessage="RATE" hidemessage="RATE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
239 -
240 -\\**Description:** Track app/item rate
241 -**Event category:** RATE
242 -**Recommended parameters:** RATING_VALUE, CONTENT_TYPE, CONTENT_ID, CONTENT, MAX_RATING_VALUE
243 -{{/showhide}}
244 -
245 -{{showhide id="13" showmessage="SEARCH" hidemessage="SEARCH" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
246 -\\**Description:** Track search event
247 -**Event category:** SEARCH
248 -**Recommended parameters:** CONTENT_TYPE, SEARCH_STRING, SUCCESS
249 -{{/showhide}}
250 -
251 -{{showhide id="14" showmessage="USED_CREDIT" hidemessage="USED_CREDIT" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
252 -\\**Description:** Track use of credit
253 -**Event category:** USED_CREDIT
254 -**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT
255 -{{/showhide}}
256 -
257 -{{showhide id="15" showmessage="UNLOCKED_ACHIEVEMENT" hidemessage="UNLOCKED_ACHIEVEMENT" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
258 -\\**Description:** Track achievement unlock
259 -**Event category:** UNLOCKED_ACHIEVEMENT
260 -**Recommended parameters:** DESCRIPTION
261 -{{/showhide}}
262 -
263 -{{showhide id="16" showmessage="VIEW_CONTENT" hidemessage="VIEW_CONTENT" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
264 -\\**Description:** Track content view event
265 -**Event category:** VIEW_CONTENT
266 -**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY
267 -{{/showhide}}
268 -
269 -{{showhide id="17" showmessage="VIEW_LIST" hidemessage="VIEW_LIST" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
270 -\\**Description:** Track list event
271 -**Event category:** VIEW_LIST
272 -**Recommended parameters:** CONTENT_TYPE, CONTENT_LIST
273 -{{/showhide}}
274 -
275 -{{showhide id="18" showmessage="CLICK_AD" hidemessage="CLICK_AD" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
276 -\\**Description:** Track ad click
277 -**Event category:** CLICK_AD
278 -**Recommended parameters:** CONTENT_TYPE, CONTENT_ID
279 -{{/showhide}}
280 -
281 -{{showhide id="19" showmessage="VIEW_AD" hidemessage="VIEW_AD" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
282 -\\**Description:** Track view ad
283 -**Event category:** VIEW_AD
284 -**Recommended parameters:** CONTENT_TYPE, CONTENT_ID
285 -{{/showhide}}
286 -
287 -{{showhide id="20" showmessage="EVENT_BOOKING" hidemessage="EVENT_BOOKING" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
288 -\\**Description:** Track booking event
289 -**Event category:** EVENT_BOOKING
290 -**Recommended parameters:** REVENUE, DESTINATION_A, DESTINATION_B, CLASS, DESCRIPTION, CUSTOMER_USER_ID, CONTENT_TYPE, CONTENT_ID, DATE_A, DATE_B
291 -{{/showhide}}
292 -
293 -{{showhide id="21" showmessage="SHARE" hidemessage="SHARE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
294 -\\**Description:** Track share event
295 -**Event category:** SHARE
296 -**Recommended parameters:** DESCRIPTION
297 -{{/showhide}}
298 -
299 -{{showhide id="22" showmessage="INVITE" hidemessage="INVITE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
300 -\\**Description:** Track social invite event
301 -**Event category:** INVITE
302 -**Recommended parameters:** NONE
303 -{{/showhide}}
304 -
305 -{{showhide id="23" showmessage="LOGIN" hidemessage="LOGIN" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
306 -\\**Description:** Track user login event
307 -**Event category:** LOGIN
308 -**Recommended parameters:** NONE
309 -{{/showhide}}
310 -
311 -{{showhide id="24" showmessage="EVENT_RETURN" hidemessage="EVENT_RETURN" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
312 -\\**Description:** Track re engagement event
313 -**Event category:** EVENT_RETURN
314 -**Recommended parameters:** NONE
315 -{{/showhide}}
316 -
317 -{{showhide id="25" showmessage="OPENED_PUSH_NOTIFICATION" hidemessage="OPENED_PUSH_NOTIFICATION" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
318 -\\**Description:** Track user opened push notification
319 -**Event category:** OPENED_PUSH_NOTIFICATION
320 -**Recommended parameters:** NONE
321 -{{/showhide}}
322 -
323 -{{showhide id="26" showmessage="UPDATE" hidemessage="UPDATE" effect="slide" effectduration="0.3" style="border-radius: 5px; border: 1px solid powderblue; padding: 7px 7px 7px 30px; margin: -1px 0px 0px 0px"}}
324 -\\**Description:** Track update event
325 -**Event category:** UPDATE
326 -**Recommended parameters:** CONTENT_ID
327 -{{/showhide}}
328 -
329 -=== 3.2.4 Event parameters ===
330 -
331 -In addition each category that is passed with event may have optional parameters defined as part of the plugin constants, or custom defined as String. Below is a list of recommended parameters.
332 -
333 -{{showhide id="1" showmessage="Parameters list" hidemessage="Parameters list" effect="slide" effectduration="0.3"}}
334 -
335 -(% class="table-bordered table-hover" %)
336 -|(% style="background-color:powderblue; width:200px" %)**Parameter enum**|(% style="background-color:powderblue; width:200px" %)**Recommended value**
337 -|(% style="width:200px" %)REVENUE|(% style="width:200px" %)FLoat
338 -|(% style="width:200px" %)PRICE|(% style="width:200px" %)Float
339 -|(% style="width:200px" %)LEVEL|(% style="width:200px" %)Integer
340 -|(% style="width:200px" %)SUCCESS|(% style="width:200px" %)Boolean
341 -|(% style="width:200px" %)CONTENT_TYPE|(% style="width:200px" %)String
342 -|(% style="width:200px" %)CONTENT_LIST|(% style="width:200px" %)Array of strings
343 -|(% style="width:200px" %)CONTENT_ID|(% style="width:200px" %)String
344 -|(% style="width:200px" %)CURRENCY|(% style="width:200px" %)String
345 -|(% style="width:200px" %)REGISTRATION_METHOD|(% style="width:200px" %)String
346 -|(% style="width:200px" %)QUANTITY|(% style="width:200px" %)Integer
347 -|(% style="width:200px" %)PAYMENT_INFO_AVAILABLE|(% style="width:200px" %)Boolean
348 -|(% style="width:200px" %)RATING_VALUE|(% style="width:200px" %)Float
349 -|(% style="width:200px" %)MAX_RATING_VALUE|(% style="width:200px" %)Float
350 -|(% style="width:200px" %)SEARCH_STRING|(% style="width:200px" %)String
351 -|(% style="width:200px" %)DESCRIPTION|(% style="width:200px" %)String
352 -|(% style="width:200px" %)SCORE|(% style="width:200px" %)Integer
353 -|(% style="width:200px" %)DESTINATION_A|(% style="width:200px" %)String
354 -|(% style="width:200px" %)DESTINATION_B|(% style="width:200px" %)String
355 -|(% style="width:200px" %)CLASS|(% style="width:200px" %)String
356 -|(% style="width:200px" %)DATE_A|(% style="width:200px" %)String
357 -|(% style="width:200px" %)DATE_B|(% style="width:200px" %)String
358 -|(% style="width:200px" %)EVENT_START|(% style="width:200px" %)Unixtime
359 -|(% style="width:200px" %)EVENT_END|(% style="width:200px" %)Unixtime
360 -|(% style="width:200px" %)LATITUDE|(% style="width:200px" %)Double
361 -|(% style="width:200px" %)LONGITUDE|(% style="width:200px" %)Double
362 -|(% style="width:200px" %)CUSTOMER_USER_ID|(% style="width:200px" %)String
363 -|(% style="width:200px" %)CUSTOMER_SEGMENT|(% style="width:200px" %)String
364 -|(% style="width:200px" %)VALIDATED|(% style="width:200px" %)String
365 -|(% style="width:200px" %)RECEIPT_ID|(% style="width:200px" %)String
366 -|(% style="width:200px" %)ORDER_ID|(% style="width:200px" %)String
367 -|(% style="width:200px" %)TUTORIAL_ID|(% style="width:200px" %)String
368 -|(% style="width:200px" %)ACHIEVEMENT_ID|(% style="width:200px" %)String
369 -|(% style="width:200px" %)VIRTUAL_CURRENCY_NAME|(% style="width:200px" %)String
370 -|(% style="width:200px" %)DEEP_LINK|(% style="width:200px" %)String
371 -|(% style="width:200px" %)OLD_VERSION|(% style="width:200px" %)String
372 -|(% style="width:200px" %)NEW_VERSION|(% style="width:200px" %)String
373 -|(% style="width:200px" %)REVIEW_TEXT|(% style="width:200px" %)String
374 -|(% style="width:200px" %)COUPON_CODE|(% style="width:200px" %)String
375 -|(% style="width:200px" %)DEPARTING_DEPARTURE_DATE|(% style="width:200px" %)String
376 -|(% style="width:200px" %)RETURNING_DEPARTURE_DATE|(% style="width:200px" %)String
377 -|(% style="width:200px" %)DESTINATION_LIST|(% style="width:200px" %)String[]
378 -|(% style="width:200px" %)CITY|(% style="width:200px" %)String
379 -|(% style="width:200px" %)REGION|(% style="width:200px" %)String
380 -|(% style="width:200px" %)COUNTRY|(% style="width:200px" %)String
381 -|(% style="width:200px" %)DEPARTING_ARRIVAL_DATE|(% style="width:200px" %)String
382 -|(% style="width:200px" %)RETURNING_ARRIVAL_DATE|(% style="width:200px" %)String
383 -|(% style="width:200px" %)SUGGESTED_DESTINATIONS|(% style="width:200px" %)String[]
384 -|(% style="width:200px" %)TRAVEL_START|(% style="width:200px" %)String
385 -|(% style="width:200px" %)TRAVEL_END|(% style="width:200px" %)String
386 -|(% style="width:200px" %)NUM_ADULTS|(% style="width:200px" %)Integer
387 -|(% style="width:200px" %)NUM_CHILDREN|(% style="width:200px" %)Integer
388 -|(% style="width:200px" %)NUM_INFANTS|(% style="width:200px" %)Integer
389 -|(% style="width:200px" %)SUGGESTED_HOTELS|(% style="width:200px" %)String[]
390 -|(% style="width:200px" %)USER_SCORE|(% style="width:200px" %)Float
391 -|(% style="width:200px" %)HOTEL_SCORE|(% style="width:200px" %)Float
392 -|(% style="width:200px" %)PURCHASE_CURRENCY|(% style="width:200px" %)String
393 -|(% style="width:200px" %)PREFERRED_STAR_RATINGS|(% style="width:200px" %)Integer[2]
394 -|(% style="width:200px" %)PREFERRED_PRICE_RANGE|(% style="width:200px" %)Integer[2]
395 -|(% style="width:200px" %)PREFERRED_NEIGHBORHOODS|(% style="width:200px" %)String[]
396 -|(% style="width:200px" %)PREFERRED_NUM_STOPS|(% style="width:200px" %)Integer
397 -|(% style="width:200px" %)CONTENT|(% style="width:200px" %)String
398 -|(% style="width:200px" %)PARAM_1|(% style="width:200px" %)String
399 -|(% style="width:200px" %)PARAM_2|(% style="width:200px" %)String
400 -|(% style="width:200px" %)PARAM_3|(% style="width:200px" %)String
401 -|(% style="width:200px" %)PARAM_4|(% style="width:200px" %)String
402 -|(% style="width:200px" %)PARAM_5|(% style="width:200px" %)String
403 -|(% style="width:200px" %)PARAM_6|(% style="width:200px" %)String
404 -|(% style="width:200px" %)PARAM_7|(% style="width:200px" %)String
405 -|(% style="width:200px" %)PARAM_8|(% style="width:200px" %)String
406 -|(% style="width:200px" %)PARAM_9|(% style="width:200px" %)String
407 -|(% style="width:200px" %)PARAM_10|(% style="width:200px" %)String
408 -
409 -{{/showhide}}
410 -
411 -== 3.3 Remaining methods ==
412 -
413 -**Mobigate.setCollectAll()**
414 -This method enables all data collectors. By default all data collectors are enabled.
415 -
416 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
417 -{{code language="javascript"}}
418 -Mobigate.disableAllDataCollector()
419 -{{/code}}
420 -{{/showhide}}
421 -
422 -(% style="color:powderblue" %)
423 -----
424 -
425 -**Mobigate.configureDataCollectors(enable, collectors)**
426 -Enable or disable DataCollector by array collectors input
427 -
428 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
429 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
430 -|enable|boolean|true if enable, false if disable|
431 -|collectors|array of [[data collector const>>doc:||anchor="H4.3Datacollectorsconstants"]]|e.g.,[Mobigate.DATA_COLLECTOR_BATTERY, DATA_COLLECTOR_GEOLOCATION]|
432 -
433 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
434 -{{code language="javascript"}}
435 -Mobigate.configureDataCollectors(true, [Mobigate.DATA_COLLECTOR_APPS_LIST,
436 - Mobigate.DATA_COLLECTOR_BATTERY,
437 - Mobigate.DATA_COLLECTOR_PHONE_INFO])
438 -{{/code}}
439 -{{/showhide}}
440 -
441 -(% style="color:powderblue" %)
442 -----
443 -
444 -**Mobigate.disableAllDataCollector()**
445 -Disable all data collectors
446 -
447 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
448 -{{code language="javascript"}}
449 -Mobigate.disableAllDataCollector()
450 -{{/code}}
451 -{{/showhide}}
452 -
453 -(% style="color:powderblue" %)
454 -----
455 -
456 -**Mobigate.setEmail(email)**
457 -Set user's email
458 -
459 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
460 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
461 -|email |String |user's email address |
462 -
463 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
464 -{{code language="javascript"}}
465 -Mobigate.setEmail('emailExample@spicymobile.pl')
466 -{{/code}}
467 -{{/showhide}}
468 -
469 -(% style="color:powderblue" %)
470 -----
471 -
472 -**Mobigate.getEmail(onSuccess, onError)**
473 -Get previously set user email
474 -
475 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
476 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
477 -|onSuccess |Function |returns callback object
478 -|onError |Function |returns callback object
479 -
480 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
481 -{{code language="javascript"}}
482 -Mobigate.getEmail((success) => {
483 - console.log("user email: " + success)
484 - }, (error) => {
485 - console.log(error)
486 - })
487 -{{/code}}
488 -{{/showhide}}
489 -
490 -(% style="color:powderblue" %)
491 -----
492 -
493 -**Mobigate.setFbToken(token)**
494 -Set fb token for social network collector
495 -
496 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
497 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
498 -|token |string |facebook token
499 -
500 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
501 -{{code language="javascript"}}
502 -Mobigate.setFbToken('9dsf87ds98978das98d7893u12rj808d0j09012jd012')
503 -{{/code}}
504 -{{/showhide}}
505 -
506 -(((
507 -(% class="showhidebutton" %)
508 -(((
509 -{{html clean="false"}}
510 -<a href="javascript:void(0)" id="showhidebuttontext3" data-show-duration="0" data-show-effect="toggle" data-show-message="Example" data-hide-message="Example">Example</a>
511 -{{/html}}
512 -)))
513 -
514 -(% class="showhidecontent" id="showhidecontent3" style="display: none;" %)
515 -(((
516 -(((
517 -{{code language="javascript"}}
518 -Mobigate.setFbToken('9dsf87ds98978das98d7893u12rj808d0j09012jd012')
519 -{{/code}}
520 -)))
521 -)))
522 -)))
523 -
524 -
525 -
526 -(% style="color:powderblue" %)
527 -----
528 -
529 -**Mobigate.getSDKInfo(onSuccess, onError)**
530 -Getting information about the library
531 -
532 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
533 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
534 -|onSuccess |Function |returns callback object
535 -|onError |Function |returns callback object
536 -
537 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
538 -{{code language="javascript"}}
539 -Mobigate.getSDKInfo((success) => {
540 - console.log("sdk info: " + success)
541 - }, (error) => {
542 - console.log(error)
543 - })
544 -{{/code}}
545 -{{/showhide}}
546 -
547 -(% style="color:powderblue" %)
548 -----
549 -
550 -**Mobigate.getSDKUniqueIdentifier(onSuccess, onError)**
551 -Return unique SDK identificator
552 -
553 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
554 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
555 -|onSuccess |Function |returns callback object
556 -|onError |Function |returns callback object
557 -
558 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
559 -{{code language="javascript"}}
560 -Mobigate.getSDKUniqueIdentifier((success) => {
561 - console.log("UUID: " + success)
562 - }, (error) => {
563 - console.log(error)
564 - })
565 -{{/code}}
566 -{{/showhide}}
567 -
568 -(% style="color:powderblue" %)
569 -----
570 -
571 -**Mobigate.getIDsProfiles(onSuccess, onError)**
572 -Method returns IDs profiles. List of IDs profiles in the application memory is updated (synchronized with the server) at specified intervals. To enable functionality, use the 'enableIDsProfiles (boolean enable)' method. Returns the identifiers of IDs profiles (ex. 5,9,20), returns '0' if list of user IDs profiles is empty, returns 'null' if the system has not yet communicated
573 -
574 -
575 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
576 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
577 -|onSuccess |Function |returns callback object
578 -|onError |Function |returns callback object
579 -
580 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
581 -{{code language="javascript"}}
582 -Mobigate.getIDsProfiles((success) => {
583 - console.log("Profiles: " + success)
584 - }, (error) => {
585 - console.log(error)
586 - })
587 -{{/code}}
588 -{{/showhide}}
589 -
590 -(% style="color:powderblue" %)
591 -----
592 -
593 -**Mobigate.getAdOceanTargeting(onSuccess, onError)**
594 -Getting numerical variables, that can be used for ads targeting. Method must be called from separate thread. Return 3 different identifiers of a user, encoded into a map of AdOcean numerical variables
595 -
596 -(% class="table-bordered table-hover" style="border-color:powderblue" %)
597 -|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
598 -|onSuccess |Function |returns callback object
599 -|onError |Function |returns callback object
600 -
601 -{{showhide id="3" showmessage="Example" hidemessage="Example"}}
602 -{{code language="javascript"}}
603 -Mobigate.getAdOceanTargeting((success) => {
604 - console.log("Adocean targeting: " + success)
605 - }, (error) => {
606 - console.log(error)
607 - })
608 -{{/code}}
609 -{{/showhide}}
610 -
611 -= 4. Constants =
612 -
613 -The plugin provides many helpful constants for easier implementation.
614 -
615 -== 4.1 User field constants ==
616 -
617 -Used to set custom user fields inside //Mobigate.init()// method:
618 -
619 -* Mobigate.USER_FIELD_EMAIL
620 -* Mobigate.USER_FIELD_IMSI
621 -* Mobigate.USER_FIELD_IMEI
622 -* Mobigate.USER_FIELD_SERIAL
623 -
624 -== 4.2 Data gather policy constants ==
625 -
626 -Used to set how the library collects data:
627 -
628 -* Mobigate.DATA_GATHER_POLICY_DEFAULT
629 -* Mobigate.DATA_GATHER_POLICY_HIDE_TRAY
630 -* Mobigate.DATA_GATHER_POLICY_BLOCK_DATA_BG
631 -
632 -== 4.3 Data collectors constants ==
633 -
634 -Used to set which data the library should collect:
635 -
636 -* Mobigate.DATA_COLLECTOR_APPS_LIST
637 -* Mobigate.DATA_COLLECTOR_APPS_USAGE
638 -* Mobigate.DATA_COLLECTOR_BATTERY
639 -* Mobigate.DATA_COLLECTOR_BROWSER
640 -* Mobigate.DATA_COLLECTOR_CALENDAR_EVENTS
641 -* Mobigate.DATA_COLLECTOR_CPU_PROCESS
642 -* Mobigate.DATA_COLLECTOR_DICTIONARY
643 -* Mobigate.DATA_COLLECTOR_GEOLOCATION
644 -* Mobigate.DATA_COLLECTOR_HEADSET_PLUG
645 -* Mobigate.DATA_COLLECTOR_MEDIA_FILES
646 -* Mobigate.DATA_COLLECTOR_MEMORY_USEAGE
647 -* Mobigate.DATA_COLLECTOR_NETWORK_CONNECTION
648 -* Mobigate.DATA_COLLECTOR_NETWORK_USEAGE
649 -* Mobigate.DATA_COLLECTOR_PACKAGE_CHANGE
650 -* Mobigate.DATA_COLLECTOR_PHONE_INFO
651 -* Mobigate.DATA_COLLECTOR_ROAMING
652 -* Mobigate.DATA_COLLECTOR_SCREEN_ORIENTED
653 -* Mobigate.DATA_COLLECTOR_SIGNAL_STRENGTH
654 -* Mobigate.DATA_COLLECTOR_PROFILE_MODE
655 -* Mobigate.DATA_COLLECTOR_WIFI_DATA_CONNECTION
656 -* Mobigate.DATA_COLLECTOR_PERMISSION_COLLECTOR
657 -* Mobigate.DATA_COLLECTOR_NFC_COLLECTOR
658 -* Mobigate.DATA_COLLECTOR_BLUETOOTH_COLLECTOR
659 -* Mobigate.DATA_COLLECTOR_BLUETOOTH_DEVICES_COLLECTOR
660 -* Mobigate.DATA_COLLECTOR_MOVEMENT_COLLECTOR
661 -* Mobigate.DATA_COLLECTOR_FACEBOOK_NETWORK_COLLECTOR
662 -* Mobigate.DATA_COLLECTOR_ROOT_COLLECTOR
663 -
664 -== 4.4 Category and parameter constants ==
665 -
666 -Instead of using defined [[categories>>doc:||anchor="H3.2.3Eventcategories"]] or [[parameters>>doc:||anchor="H3.2.4Eventparameters"]] in the form of text, you can use constants defined in the plugin. All you have to do is add the prefix "CATEGORY_" or "PARAMETER_" to the category name or parameter e.g., Mobigate.CATEGORY_LEVEL_ACCOMPLISHED, Mobigate.CATEGORY_PURCHASE, Mobigate.PARAMETER_PRICE, Mobigate.PARAMETER_LEVEL.
667 -
668 -= 5. Sample app =
669 -
670 -The sample application is located in the github repository [[here>>https://github.com/mobigatesdk/react-native-mobigate]] in //example// folder.
Spicy Mobile
spicymobile.pl