Changes for page Flutter integration
Last modified by Developer on 2020/03/19 15:21
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 - xwiki:XWiki.spicyadmin1 +XWiki.developer - Content
-
... ... @@ -1,0 +1,660 @@ 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.3 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.3.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, flutter_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.3.2 Implementation === 109 + 110 +Tracking in-app events is performed by two methods: 111 + 112 +**void trackEvent(Category category)** 113 + 114 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 115 +|=(% style="background-color:powderblue" %)Parameter|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 116 +|Category|Category class |Category class built with help of CategoryBuilder 117 + 118 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 119 +{{code language="dart"}} 120 +mobigateInstance.trackEvent((CategoryBuilder(EventCategory.BEGIN_TRIAL) 121 + ..setParameter(EventParameter.CITY, "Warsaw") 122 + ..setParameter(EventParameter.CONTENT_ID, 523456) 123 + ..setParameter(EventParameter.COUPON_CODE, 97636572) 124 + ..setParameter(EventParameter.CUSTOMER_SEGMENT, [1, 2, 4])) 125 + .build()); 126 +{{/code}} 127 +{{/showhide}} 128 + 129 + 130 +**void trackAppInstall(int timestamp)** 131 + 132 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 133 +|=(% style="background-color:powderblue" %)Parameter|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 134 +|timestamp|double|Unix timestamp in milliseconds 135 + 136 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 137 +{{code language="javascript"}} 138 + sendTrackEvent = () => { 139 + if (Platform.OS === 'android') { 140 + Mobigate.trackAppInstall(1578042916000) 141 + } 142 + } 143 +{{/code}} 144 +{{/showhide}} 145 + 146 +=== 3.3.3 Event categories === 147 + 148 +The following section describes the recommended structure of each event category. In-app events categories are defined as part of plugin String constants. 149 + 150 + 151 +{{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"}} 152 + 153 +\\**Description:** Track accomplished game level achievement 154 +**Event category:** LEVEL_ACCOMPLISHED 155 +**Recommended parameters:** LEVEL, SCORE 156 +{{/showhide}} 157 + 158 +{{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"}} 159 + 160 +\\**Description:** Track payment info 161 +**Event category:** ADD_PAYMENT_INFO 162 +**Recommended parameters:** SUCCESS 163 +{{/showhide}} 164 + 165 +{{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"}} 166 + 167 +\\**Description:** Track add item to basket 168 +**Event category:** ADD_TO_BASKET 169 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY 170 +{{/showhide}} 171 + 172 +{{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"}} 173 + 174 +\\**Description:** Track removed item from basket 175 +**Event category:** REMOVED_FROM_BASKET 176 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY 177 +{{/showhide}} 178 + 179 +{{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"}} 180 + 181 +\\**Description:** Track add item to wish list 182 +**Event category:** ADD_TO_WISH_LIST 183 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY, QUANTITY 184 +{{/showhide}} 185 + 186 +{{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"}} 187 + 188 +\\**Description:** Track registration 189 +**Event category:** REGISTRATION 190 +**Recommended parameters:** REGISTRATION_METHOD 191 +{{/showhide}} 192 + 193 +{{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"}} 194 + 195 +\\**Description:** Track tutorial completion 196 +**Event category:** TUTORIAL_COMPLETION 197 +**Recommended parameters:** SUCCESS, CONTENT, CONTENT_ID 198 +{{/showhide}} 199 + 200 +{{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"}} 201 + 202 +\\**Description:** Track triggered checkout 203 +**Event category:** TRIGGER_CHECKOUT 204 +**Recommended parameters:** PROCE, CONTENT_TYPE, CONTENT_ID, CONTENT, QUANTITY, PAYMENT_INFO_AVAILABLE, CURRENCY 205 +{{/showhide}} 206 + 207 +{{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"}} 208 + 209 +\\**Description:** Track purchased item 210 +**Event category:** PURCHASE 211 +**Recommended parameters:** REVENUE, CONTENT_TYPE, CONTENT_ID, CONTENT, PRICE, QUANTITY, CURRENCY, ORDER_ID 212 +{{/showhide}} 213 + 214 +{{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"}} 215 + 216 +\\**Description:** Track subscription purchase 217 +**Event category:** SUBSCRIBE 218 +**Recommended parameters:** REVENUE, CURRENCY 219 +{{/showhide}} 220 + 221 +{{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"}} 222 + 223 +\\**Description:** Track begin trail of product 224 +**Event category:** BEGIN_TRIAL 225 +**Recommended parameters:** PRICE, CURRENCY 226 +{{/showhide}} 227 + 228 +{{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"}} 229 + 230 +\\**Description:** Track app/item rate 231 +**Event category:** RATE 232 +**Recommended parameters:** RATING_VALUE, CONTENT_TYPE, CONTENT_ID, CONTENT, MAX_RATING_VALUE 233 +{{/showhide}} 234 + 235 +{{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"}} 236 +\\**Description:** Track search event 237 +**Event category:** SEARCH 238 +**Recommended parameters:** CONTENT_TYPE, SEARCH_STRING, SUCCESS 239 +{{/showhide}} 240 + 241 +{{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"}} 242 +\\**Description:** Track use of credit 243 +**Event category:** USED_CREDIT 244 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT 245 +{{/showhide}} 246 + 247 +{{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"}} 248 +\\**Description:** Track achievement unlock 249 +**Event category:** UNLOCKED_ACHIEVEMENT 250 +**Recommended parameters:** DESCRIPTION 251 +{{/showhide}} 252 + 253 +{{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"}} 254 +\\**Description:** Track content view event 255 +**Event category:** VIEW_CONTENT 256 +**Recommended parameters:** PRICE, CONTENT_TYPE, CONTENT_ID, CONTENT, CURRENCY 257 +{{/showhide}} 258 + 259 +{{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"}} 260 +\\**Description:** Track list event 261 +**Event category:** VIEW_LIST 262 +**Recommended parameters:** CONTENT_TYPE, CONTENT_LIST 263 +{{/showhide}} 264 + 265 +{{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"}} 266 +\\**Description:** Track ad click 267 +**Event category:** CLICK_AD 268 +**Recommended parameters:** CONTENT_TYPE, CONTENT_ID 269 +{{/showhide}} 270 + 271 +{{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"}} 272 +\\**Description:** Track view ad 273 +**Event category:** VIEW_AD 274 +**Recommended parameters:** CONTENT_TYPE, CONTENT_ID 275 +{{/showhide}} 276 + 277 +{{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"}} 278 +\\**Description:** Track booking event 279 +**Event category:** EVENT_BOOKING 280 +**Recommended parameters:** REVENUE, DESTINATION_A, DESTINATION_B, CLASS, DESCRIPTION, CUSTOMER_USER_ID, CONTENT_TYPE, CONTENT_ID, DATE_A, DATE_B 281 +{{/showhide}} 282 + 283 +{{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"}} 284 +\\**Description:** Track share event 285 +**Event category:** SHARE 286 +**Recommended parameters:** DESCRIPTION 287 +{{/showhide}} 288 + 289 +{{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"}} 290 +\\**Description:** Track social invite event 291 +**Event category:** INVITE 292 +**Recommended parameters:** NONE 293 +{{/showhide}} 294 + 295 +{{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"}} 296 +\\**Description:** Track user login event 297 +**Event category:** LOGIN 298 +**Recommended parameters:** NONE 299 +{{/showhide}} 300 + 301 +{{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"}} 302 +\\**Description:** Track re engagement event 303 +**Event category:** EVENT_RETURN 304 +**Recommended parameters:** NONE 305 +{{/showhide}} 306 + 307 +{{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"}} 308 +\\**Description:** Track user opened push notification 309 +**Event category:** OPENED_PUSH_NOTIFICATION 310 +**Recommended parameters:** NONE 311 +{{/showhide}} 312 + 313 +{{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"}} 314 +\\**Description:** Track update event 315 +**Event category:** UPDATE 316 +**Recommended parameters:** CONTENT_ID 317 +{{/showhide}} 318 + 319 +=== 3.2.4 Event parameters === 320 + 321 +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. 322 + 323 +{{showhide id="1" showmessage="Parameters list" hidemessage="Parameters list" effect="slide" effectduration="0.3"}} 324 + 325 +(% class="table-bordered table-hover" %) 326 +|(% style="background-color:powderblue; width:200px" %)**Parameter enum**|(% style="background-color:powderblue; width:200px" %)**Recommended value** 327 +|(% style="width:200px" %)REVENUE|(% style="width:200px" %)FLoat 328 +|(% style="width:200px" %)PRICE|(% style="width:200px" %)Float 329 +|(% style="width:200px" %)LEVEL|(% style="width:200px" %)Integer 330 +|(% style="width:200px" %)SUCCESS|(% style="width:200px" %)Boolean 331 +|(% style="width:200px" %)CONTENT_TYPE|(% style="width:200px" %)String 332 +|(% style="width:200px" %)CONTENT_LIST|(% style="width:200px" %)Array of strings 333 +|(% style="width:200px" %)CONTENT_ID|(% style="width:200px" %)String 334 +|(% style="width:200px" %)CURRENCY|(% style="width:200px" %)String 335 +|(% style="width:200px" %)REGISTRATION_METHOD|(% style="width:200px" %)String 336 +|(% style="width:200px" %)QUANTITY|(% style="width:200px" %)Integer 337 +|(% style="width:200px" %)PAYMENT_INFO_AVAILABLE|(% style="width:200px" %)Boolean 338 +|(% style="width:200px" %)RATING_VALUE|(% style="width:200px" %)Float 339 +|(% style="width:200px" %)MAX_RATING_VALUE|(% style="width:200px" %)Float 340 +|(% style="width:200px" %)SEARCH_STRING|(% style="width:200px" %)String 341 +|(% style="width:200px" %)DESCRIPTION|(% style="width:200px" %)String 342 +|(% style="width:200px" %)SCORE|(% style="width:200px" %)Integer 343 +|(% style="width:200px" %)DESTINATION_A|(% style="width:200px" %)String 344 +|(% style="width:200px" %)DESTINATION_B|(% style="width:200px" %)String 345 +|(% style="width:200px" %)CLASS|(% style="width:200px" %)String 346 +|(% style="width:200px" %)DATE_A|(% style="width:200px" %)String 347 +|(% style="width:200px" %)DATE_B|(% style="width:200px" %)String 348 +|(% style="width:200px" %)EVENT_START|(% style="width:200px" %)Unixtime 349 +|(% style="width:200px" %)EVENT_END|(% style="width:200px" %)Unixtime 350 +|(% style="width:200px" %)LATITUDE|(% style="width:200px" %)Double 351 +|(% style="width:200px" %)LONGITUDE|(% style="width:200px" %)Double 352 +|(% style="width:200px" %)CUSTOMER_USER_ID|(% style="width:200px" %)String 353 +|(% style="width:200px" %)CUSTOMER_SEGMENT|(% style="width:200px" %)String 354 +|(% style="width:200px" %)VALIDATED|(% style="width:200px" %)String 355 +|(% style="width:200px" %)RECEIPT_ID|(% style="width:200px" %)String 356 +|(% style="width:200px" %)ORDER_ID|(% style="width:200px" %)String 357 +|(% style="width:200px" %)TUTORIAL_ID|(% style="width:200px" %)String 358 +|(% style="width:200px" %)ACHIEVEMENT_ID|(% style="width:200px" %)String 359 +|(% style="width:200px" %)VIRTUAL_CURRENCY_NAME|(% style="width:200px" %)String 360 +|(% style="width:200px" %)DEEP_LINK|(% style="width:200px" %)String 361 +|(% style="width:200px" %)OLD_VERSION|(% style="width:200px" %)String 362 +|(% style="width:200px" %)NEW_VERSION|(% style="width:200px" %)String 363 +|(% style="width:200px" %)REVIEW_TEXT|(% style="width:200px" %)String 364 +|(% style="width:200px" %)COUPON_CODE|(% style="width:200px" %)String 365 +|(% style="width:200px" %)DEPARTING_DEPARTURE_DATE|(% style="width:200px" %)String 366 +|(% style="width:200px" %)RETURNING_DEPARTURE_DATE|(% style="width:200px" %)String 367 +|(% style="width:200px" %)DESTINATION_LIST|(% style="width:200px" %)String[] 368 +|(% style="width:200px" %)CITY|(% style="width:200px" %)String 369 +|(% style="width:200px" %)REGION|(% style="width:200px" %)String 370 +|(% style="width:200px" %)COUNTRY|(% style="width:200px" %)String 371 +|(% style="width:200px" %)DEPARTING_ARRIVAL_DATE|(% style="width:200px" %)String 372 +|(% style="width:200px" %)RETURNING_ARRIVAL_DATE|(% style="width:200px" %)String 373 +|(% style="width:200px" %)SUGGESTED_DESTINATIONS|(% style="width:200px" %)String[] 374 +|(% style="width:200px" %)TRAVEL_START|(% style="width:200px" %)String 375 +|(% style="width:200px" %)TRAVEL_END|(% style="width:200px" %)String 376 +|(% style="width:200px" %)NUM_ADULTS|(% style="width:200px" %)Integer 377 +|(% style="width:200px" %)NUM_CHILDREN|(% style="width:200px" %)Integer 378 +|(% style="width:200px" %)NUM_INFANTS|(% style="width:200px" %)Integer 379 +|(% style="width:200px" %)SUGGESTED_HOTELS|(% style="width:200px" %)String[] 380 +|(% style="width:200px" %)USER_SCORE|(% style="width:200px" %)Float 381 +|(% style="width:200px" %)HOTEL_SCORE|(% style="width:200px" %)Float 382 +|(% style="width:200px" %)PURCHASE_CURRENCY|(% style="width:200px" %)String 383 +|(% style="width:200px" %)PREFERRED_STAR_RATINGS|(% style="width:200px" %)Integer[2] 384 +|(% style="width:200px" %)PREFERRED_PRICE_RANGE|(% style="width:200px" %)Integer[2] 385 +|(% style="width:200px" %)PREFERRED_NEIGHBORHOODS|(% style="width:200px" %)String[] 386 +|(% style="width:200px" %)PREFERRED_NUM_STOPS|(% style="width:200px" %)Integer 387 +|(% style="width:200px" %)CONTENT|(% style="width:200px" %)String 388 +|(% style="width:200px" %)PARAM_1|(% style="width:200px" %)String 389 +|(% style="width:200px" %)PARAM_2|(% style="width:200px" %)String 390 +|(% style="width:200px" %)PARAM_3|(% style="width:200px" %)String 391 +|(% style="width:200px" %)PARAM_4|(% style="width:200px" %)String 392 +|(% style="width:200px" %)PARAM_5|(% style="width:200px" %)String 393 +|(% style="width:200px" %)PARAM_6|(% style="width:200px" %)String 394 +|(% style="width:200px" %)PARAM_7|(% style="width:200px" %)String 395 +|(% style="width:200px" %)PARAM_8|(% style="width:200px" %)String 396 +|(% style="width:200px" %)PARAM_9|(% style="width:200px" %)String 397 +|(% style="width:200px" %)PARAM_10|(% style="width:200px" %)String 398 + 399 +{{/showhide}} 400 + 401 +== 3.3 Remaining methods == 402 + 403 +**Mobigate.setCollectAll()** 404 +This method enables all data collectors. By default all data collectors are enabled. 405 + 406 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 407 +{{code language="javascript"}} 408 +Mobigate.disableAllDataCollector() 409 +{{/code}} 410 +{{/showhide}} 411 + 412 +(% style="color:powderblue" %) 413 +---- 414 + 415 +**Mobigate.configureDataCollectors(enable, collectors)** 416 +Enable or disable DataCollector by array collectors input 417 + 418 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 419 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 420 +|enable|boolean|true if enable, false if disable| 421 +|collectors|array of [[data collector const>>doc:||anchor="H4.3Datacollectorsconstants"]]|e.g.,[Mobigate.DATA_COLLECTOR_BATTERY, DATA_COLLECTOR_GEOLOCATION]| 422 + 423 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 424 +{{code language="javascript"}} 425 +Mobigate.configureDataCollectors(true, [Mobigate.DATA_COLLECTOR_APPS_LIST, 426 + Mobigate.DATA_COLLECTOR_BATTERY, 427 + Mobigate.DATA_COLLECTOR_PHONE_INFO]) 428 +{{/code}} 429 +{{/showhide}} 430 + 431 +(% style="color:powderblue" %) 432 +---- 433 + 434 +**Mobigate.disableAllDataCollector()** 435 +Disable all data collectors 436 + 437 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 438 +{{code language="javascript"}} 439 +Mobigate.disableAllDataCollector() 440 +{{/code}} 441 +{{/showhide}} 442 + 443 +(% style="color:powderblue" %) 444 +---- 445 + 446 +**Mobigate.setEmail(email)** 447 +Set user's email 448 + 449 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 450 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 451 +|email |String |user's email address | 452 + 453 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 454 +{{code language="javascript"}} 455 +Mobigate.setEmail('emailExample@spicymobile.pl') 456 +{{/code}} 457 +{{/showhide}} 458 + 459 +(% style="color:powderblue" %) 460 +---- 461 + 462 +**Mobigate.getEmail(onSuccess, onError)** 463 +Get previously set user email 464 + 465 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 466 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 467 +|onSuccess |Function |returns callback object 468 +|onError |Function |returns callback object 469 + 470 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 471 +{{code language="javascript"}} 472 +Mobigate.getEmail((success) => { 473 + console.log("user email: " + success) 474 + }, (error) => { 475 + console.log(error) 476 + }) 477 +{{/code}} 478 +{{/showhide}} 479 + 480 +(% style="color:powderblue" %) 481 +---- 482 + 483 +**Mobigate.setFbToken(token)** 484 +Set fb token for social network collector 485 + 486 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 487 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 488 +|token |string |facebook token 489 + 490 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 491 +{{code language="javascript"}} 492 +Mobigate.setFbToken('9dsf87ds98978das98d7893u12rj808d0j09012jd012') 493 +{{/code}} 494 +{{/showhide}} 495 + 496 +((( 497 +(% class="showhidebutton" %) 498 +((( 499 +{{html clean="false"}} 500 +<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> 501 +{{/html}} 502 +))) 503 + 504 +(% class="showhidecontent" id="showhidecontent3" style="display: none;" %) 505 +((( 506 +((( 507 +{{code language="javascript"}} 508 +Mobigate.setFbToken('9dsf87ds98978das98d7893u12rj808d0j09012jd012') 509 +{{/code}} 510 +))) 511 +))) 512 +))) 513 + 514 + 515 + 516 +(% style="color:powderblue" %) 517 +---- 518 + 519 +**Mobigate.getSDKInfo(onSuccess, onError)** 520 +Getting information about the library 521 + 522 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 523 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 524 +|onSuccess |Function |returns callback object 525 +|onError |Function |returns callback object 526 + 527 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 528 +{{code language="javascript"}} 529 +Mobigate.getSDKInfo((success) => { 530 + console.log("sdk info: " + success) 531 + }, (error) => { 532 + console.log(error) 533 + }) 534 +{{/code}} 535 +{{/showhide}} 536 + 537 +(% style="color:powderblue" %) 538 +---- 539 + 540 +**Mobigate.getSDKUniqueIdentifier(onSuccess, onError)** 541 +Return unique SDK identificator 542 + 543 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 544 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 545 +|onSuccess |Function |returns callback object 546 +|onError |Function |returns callback object 547 + 548 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 549 +{{code language="javascript"}} 550 +Mobigate.getSDKUniqueIdentifier((success) => { 551 + console.log("UUID: " + success) 552 + }, (error) => { 553 + console.log(error) 554 + }) 555 +{{/code}} 556 +{{/showhide}} 557 + 558 +(% style="color:powderblue" %) 559 +---- 560 + 561 +**Mobigate.getIDsProfiles(onSuccess, onError)** 562 +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 563 + 564 + 565 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 566 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 567 +|onSuccess |Function |returns callback object 568 +|onError |Function |returns callback object 569 + 570 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 571 +{{code language="javascript"}} 572 +Mobigate.getIDsProfiles((success) => { 573 + console.log("Profiles: " + success) 574 + }, (error) => { 575 + console.log(error) 576 + }) 577 +{{/code}} 578 +{{/showhide}} 579 + 580 +(% style="color:powderblue" %) 581 +---- 582 + 583 +**Mobigate.getAdOceanTargeting(onSuccess, onError)** 584 +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 585 + 586 +(% class="table-bordered table-hover" style="border-color:powderblue" %) 587 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description 588 +|onSuccess |Function |returns callback object 589 +|onError |Function |returns callback object 590 + 591 +{{showhide id="3" showmessage="Example" hidemessage="Example"}} 592 +{{code language="javascript"}} 593 +Mobigate.getAdOceanTargeting((success) => { 594 + console.log("Adocean targeting: " + success) 595 + }, (error) => { 596 + console.log(error) 597 + }) 598 +{{/code}} 599 +{{/showhide}} 600 + 601 += 4. Constants = 602 + 603 +The plugin provides many helpful constants for easier implementation. 604 + 605 +== 4.1 User field constants == 606 + 607 +Used to set custom user fields inside //Mobigate.init()// method: 608 + 609 +* Mobigate.USER_FIELD_EMAIL 610 +* Mobigate.USER_FIELD_IMSI 611 +* Mobigate.USER_FIELD_IMEI 612 +* Mobigate.USER_FIELD_SERIAL 613 + 614 +== 4.2 Data gather policy constants == 615 + 616 +Used to set how the library collects data: 617 + 618 +* Mobigate.DATA_GATHER_POLICY_DEFAULT 619 +* Mobigate.DATA_GATHER_POLICY_HIDE_TRAY 620 +* Mobigate.DATA_GATHER_POLICY_BLOCK_DATA_BG 621 + 622 +== 4.3 Data collectors constants == 623 + 624 +Used to set which data the library should collect: 625 + 626 +* Mobigate.DATA_COLLECTOR_APPS_LIST 627 +* Mobigate.DATA_COLLECTOR_APPS_USAGE 628 +* Mobigate.DATA_COLLECTOR_BATTERY 629 +* Mobigate.DATA_COLLECTOR_BROWSER 630 +* Mobigate.DATA_COLLECTOR_CALENDAR_EVENTS 631 +* Mobigate.DATA_COLLECTOR_CPU_PROCESS 632 +* Mobigate.DATA_COLLECTOR_DICTIONARY 633 +* Mobigate.DATA_COLLECTOR_GEOLOCATION 634 +* Mobigate.DATA_COLLECTOR_HEADSET_PLUG 635 +* Mobigate.DATA_COLLECTOR_MEDIA_FILES 636 +* Mobigate.DATA_COLLECTOR_MEMORY_USEAGE 637 +* Mobigate.DATA_COLLECTOR_NETWORK_CONNECTION 638 +* Mobigate.DATA_COLLECTOR_NETWORK_USEAGE 639 +* Mobigate.DATA_COLLECTOR_PACKAGE_CHANGE 640 +* Mobigate.DATA_COLLECTOR_PHONE_INFO 641 +* Mobigate.DATA_COLLECTOR_ROAMING 642 +* Mobigate.DATA_COLLECTOR_SCREEN_ORIENTED 643 +* Mobigate.DATA_COLLECTOR_SIGNAL_STRENGTH 644 +* Mobigate.DATA_COLLECTOR_PROFILE_MODE 645 +* Mobigate.DATA_COLLECTOR_WIFI_DATA_CONNECTION 646 +* Mobigate.DATA_COLLECTOR_PERMISSION_COLLECTOR 647 +* Mobigate.DATA_COLLECTOR_NFC_COLLECTOR 648 +* Mobigate.DATA_COLLECTOR_BLUETOOTH_COLLECTOR 649 +* Mobigate.DATA_COLLECTOR_BLUETOOTH_DEVICES_COLLECTOR 650 +* Mobigate.DATA_COLLECTOR_MOVEMENT_COLLECTOR 651 +* Mobigate.DATA_COLLECTOR_FACEBOOK_NETWORK_COLLECTOR 652 +* Mobigate.DATA_COLLECTOR_ROOT_COLLECTOR 653 + 654 +== 4.4 Category and parameter constants == 655 + 656 +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. 657 + 658 += 5. Sample app = 659 + 660 +The sample application is located in the github repository [[here>>https://github.com/mobigatesdk/react-native-mobigate]] in //example// folder.