From version < 11.1 >
edited by Developer
on 2020/03/19 14:51
To version < 10.1 >
edited by Developer
on 2020/03/19 14:40
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -89,11 +89,11 @@
89 89  |success|String|returns success message
90 90  |error|String|returns error message
91 91  
92 -== 3.3 Tracking in app events ==
92 +== 3.2 Tracking in app events ==
93 93  
94 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 95  
96 -=== 3.3.1 Overview ===
96 +=== 3.2.1 Overview ===
97 97  
98 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 99  
... ... @@ -103,31 +103,41 @@
103 103  |(% style="width:200px" %)Parameter|(% style="width:200px" %)String|(% style="width:200px" %)no|(% style="width:200px" %)Event parameter. 
104 104  There can be more than one
105 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"]]).
106 +You can use any event category or parameter string of your choice. However, react-native-mobigate plugin contains recommended event categories and parameters via String constants (see [[Event categories>>doc:||anchor="H3.2.3Eventcategories"]] and [[Event parameters>>doc:||anchor="H3.2.4Eventparameters"]]).
107 107  
108 -=== 3.3.2 Implementation ===
108 +=== 3.2.2 Implementation ===
109 109  
110 110  Tracking in-app events is performed by two methods:
111 111  
112 -**void trackEvent(Category category)**
112 +**Mobigate.trackEvent(options)**
113 113  
114 +{{showhide id="2" showmessage="Options" hidemessage="Options" effect="slide" effectduration="0.3"}}
114 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
116 +|=(% style="background-color:powderblue" %)Name|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Default|=(% style="background-color:powderblue" %)Description
117 +|name|String | | Event category name.
118 +|parameters|Json array| | Array of parameters. Look below on example.
119 +{{/showhide}}
117 117  
118 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());
122 +{{code language="javascript"}}
123 + sendTrackEvent = () => {
124 + if (Platform.OS === 'android') {
125 + Mobigate.trackEvent({
126 + name: Mobigate.CATEGORY_PURCHASE,
127 + parameters: {
128 + [Mobigate.PARAMETER_CONTENT_ID]: 42313532,
129 + [Mobigate.PARAMETER_PRICE]: 43.23,
130 + [Mobigate.PARAMETER_QUANTITY]: 2,
131 + 'userCustomParameterName':'simpleName'
132 + },
133 + })
134 + }
135 + }
126 126  {{/code}}
127 127  {{/showhide}}
128 128  
129 129  
130 -**void trackAppInstall(int timestamp)**
140 +**Mobigate.trackAppInstall(timestamp)**
131 131  
132 132  (% class="table-bordered table-hover" style="border-color:powderblue" %)
133 133  |=(% style="background-color:powderblue" %)Parameter|=(% style="background-color:powderblue" %)Type|=(% style="background-color:powderblue" %)Description
... ... @@ -143,7 +143,7 @@
143 143  {{/code}}
144 144  {{/showhide}}
145 145  
146 -=== 3.3.3 Event categories ===
156 +=== 3.2.3 Event categories ===
147 147  
148 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 149  
Spicy Mobile
spicymobile.pl