@@ -193,14 +193,16 @@ AmplitudeClient.prototype.init = function init(apiKey, opt_userId, opt_config, o
193
193
DeviceInfo . getCarrier ( ) ,
194
194
DeviceInfo . getModel ( ) ,
195
195
DeviceInfo . getManufacturer ( ) ,
196
+ DeviceInfo . getVersion ( ) ,
196
197
DeviceInfo . getUniqueId ( ) ,
197
198
] ) . then ( values => {
198
199
this . deviceInfo = {
199
200
carrier : values [ 0 ] ,
200
201
model : values [ 1 ] ,
201
- manufacturer : values [ 2 ]
202
+ manufacturer : values [ 2 ] ,
203
+ version : values [ 3 ]
202
204
} ;
203
- initFromStorage ( values [ 3 ] ) ;
205
+ initFromStorage ( values [ 4 ] ) ;
204
206
this . runQueuedFunctions ( ) ;
205
207
if ( type ( opt_callback ) === 'function' ) {
206
208
opt_callback ( this ) ;
@@ -1142,6 +1144,7 @@ AmplitudeClient.prototype._logEvent = function _logEvent(eventType, eventPropert
1142
1144
let osVersion = this . _ua . browser . major ;
1143
1145
let deviceModel = this . _ua . os . name ;
1144
1146
let deviceManufacturer ;
1147
+ let versionName ;
1145
1148
let carrier ;
1146
1149
if ( BUILD_COMPAT_REACT_NATIVE ) {
1147
1150
osName = Platform . OS ;
@@ -1150,6 +1153,7 @@ AmplitudeClient.prototype._logEvent = function _logEvent(eventType, eventPropert
1150
1153
carrier = this . deviceInfo . carrier ;
1151
1154
deviceManufacturer = this . deviceInfo . manufacturer ;
1152
1155
deviceModel = this . deviceInfo . model ;
1156
+ versionName = this . deviceInfo . version ;
1153
1157
}
1154
1158
}
1155
1159
@@ -1166,7 +1170,7 @@ AmplitudeClient.prototype._logEvent = function _logEvent(eventType, eventPropert
1166
1170
event_id : eventId ,
1167
1171
session_id : this . _sessionId || - 1 ,
1168
1172
event_type : eventType ,
1169
- version_name : _shouldTrackField ( this , 'version_name' ) ? ( this . options . versionName || null ) : null ,
1173
+ version_name : _shouldTrackField ( this , 'version_name' ) ? ( this . options . versionName || versionName || null ) : null ,
1170
1174
platform : _shouldTrackField ( this , 'platform' ) ? this . options . platform : null ,
1171
1175
os_name : _shouldTrackField ( this , 'os_name' ) ? ( osName || null ) : null ,
1172
1176
os_version : _shouldTrackField ( this , 'os_version' ) ? ( osVersion || null ) : null ,
0 commit comments