mixpanel-browser 2.69.0 → 2.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/mixpanel-core.cjs.js +14 -10
- package/dist/mixpanel-recorder.js +1 -1
- package/dist/mixpanel-recorder.min.js +1 -1
- package/dist/mixpanel-recorder.min.js.map +1 -1
- package/dist/mixpanel-with-async-recorder.cjs.js +14 -10
- package/dist/mixpanel-with-recorder.js +14 -10
- package/dist/mixpanel-with-recorder.min.js +1 -1
- package/dist/mixpanel.amd.js +14 -10
- package/dist/mixpanel.cjs.js +14 -10
- package/dist/mixpanel.globals.js +14 -10
- package/dist/mixpanel.min.js +82 -81
- package/dist/mixpanel.module.js +14 -10
- package/dist/mixpanel.umd.js +14 -10
- package/package.json +6 -1
- package/src/config.js +1 -1
- package/src/flags/index.js +14 -9
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var Config = {
|
|
4
4
|
DEBUG: false,
|
|
5
|
-
LIB_VERSION: '2.
|
|
5
|
+
LIB_VERSION: '2.70.0'
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file
|
|
@@ -3163,17 +3163,21 @@ FeatureFlagManager.prototype.fetchFlags = function() {
|
|
|
3163
3163
|
var distinctId = this.getMpProperty('distinct_id');
|
|
3164
3164
|
var deviceId = this.getMpProperty('$device_id');
|
|
3165
3165
|
logger$3.log('Fetching flags for distinct ID: ' + distinctId);
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3166
|
+
|
|
3167
|
+
var context = _.extend({'distinct_id': distinctId, 'device_id': deviceId}, this.getConfig(CONFIG_CONTEXT));
|
|
3168
|
+
var searchParams = new URLSearchParams();
|
|
3169
|
+
searchParams.set('context', JSON.stringify(context));
|
|
3170
|
+
searchParams.set('token', this.getMpConfig('token'));
|
|
3171
|
+
searchParams.set('mp_lib', 'web');
|
|
3172
|
+
searchParams.set('$lib_version', Config.LIB_VERSION);
|
|
3173
|
+
var url = this.getFullApiRoute() + '?' + searchParams.toString();
|
|
3174
|
+
|
|
3169
3175
|
this._fetchInProgressStartTime = Date.now();
|
|
3170
|
-
this.fetchPromise = win['fetch'](
|
|
3171
|
-
'method': '
|
|
3176
|
+
this.fetchPromise = win['fetch'](url, {
|
|
3177
|
+
'method': 'GET',
|
|
3172
3178
|
'headers': {
|
|
3173
|
-
'Authorization': 'Basic ' + btoa(this.getMpConfig('token') + ':')
|
|
3174
|
-
|
|
3175
|
-
},
|
|
3176
|
-
'body': JSON.stringify(reqParams)
|
|
3179
|
+
'Authorization': 'Basic ' + btoa(this.getMpConfig('token') + ':')
|
|
3180
|
+
}
|
|
3177
3181
|
}).then(function(response) {
|
|
3178
3182
|
this.markFetchComplete();
|
|
3179
3183
|
return response.json().then(function(responseBody) {
|
|
@@ -14042,7 +14042,7 @@
|
|
|
14042
14042
|
|
|
14043
14043
|
var Config = {
|
|
14044
14044
|
DEBUG: false,
|
|
14045
|
-
LIB_VERSION: '2.
|
|
14045
|
+
LIB_VERSION: '2.70.0'
|
|
14046
14046
|
};
|
|
14047
14047
|
|
|
14048
14048
|
/* eslint camelcase: "off", eqeqeq: "off" */
|
|
@@ -18878,17 +18878,21 @@
|
|
|
18878
18878
|
var distinctId = this.getMpProperty('distinct_id');
|
|
18879
18879
|
var deviceId = this.getMpProperty('$device_id');
|
|
18880
18880
|
logger.log('Fetching flags for distinct ID: ' + distinctId);
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18881
|
+
|
|
18882
|
+
var context = _.extend({'distinct_id': distinctId, 'device_id': deviceId}, this.getConfig(CONFIG_CONTEXT));
|
|
18883
|
+
var searchParams = new URLSearchParams();
|
|
18884
|
+
searchParams.set('context', JSON.stringify(context));
|
|
18885
|
+
searchParams.set('token', this.getMpConfig('token'));
|
|
18886
|
+
searchParams.set('mp_lib', 'web');
|
|
18887
|
+
searchParams.set('$lib_version', Config.LIB_VERSION);
|
|
18888
|
+
var url = this.getFullApiRoute() + '?' + searchParams.toString();
|
|
18889
|
+
|
|
18884
18890
|
this._fetchInProgressStartTime = Date.now();
|
|
18885
|
-
this.fetchPromise = win['fetch'](
|
|
18886
|
-
'method': '
|
|
18891
|
+
this.fetchPromise = win['fetch'](url, {
|
|
18892
|
+
'method': 'GET',
|
|
18887
18893
|
'headers': {
|
|
18888
|
-
'Authorization': 'Basic ' + btoa(this.getMpConfig('token') + ':')
|
|
18889
|
-
|
|
18890
|
-
},
|
|
18891
|
-
'body': JSON.stringify(reqParams)
|
|
18894
|
+
'Authorization': 'Basic ' + btoa(this.getMpConfig('token') + ':')
|
|
18895
|
+
}
|
|
18892
18896
|
}).then(function(response) {
|
|
18893
18897
|
this.markFetchComplete();
|
|
18894
18898
|
return response.json().then(function(responseBody) {
|