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