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