mixpanel-browser 2.69.1 → 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 CHANGED
@@ -1,3 +1,6 @@
1
+ **2.70.0** (4 Sep 2025)
2
+ - Feature flags requests now send params on query string with GET instead of POST for easier caching
3
+
1
4
  **2.68.0** (11 Aug 2025)
2
5
  - Initial rage-click detection support
3
6
  - Block `<audio>` tags by default in Session Recording
@@ -2,7 +2,7 @@
2
2
 
3
3
  var Config = {
4
4
  DEBUG: false,
5
- LIB_VERSION: '2.69.0'
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
- var reqParams = {
3167
- 'context': _.extend({'distinct_id': distinctId, 'device_id': deviceId}, this.getConfig(CONFIG_CONTEXT))
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'](this.getFullApiRoute(), {
3171
- 'method': 'POST',
3176
+ this.fetchPromise = win['fetch'](url, {
3177
+ 'method': 'GET',
3172
3178
  'headers': {
3173
- 'Authorization': 'Basic ' + btoa(this.getMpConfig('token') + ':'),
3174
- 'Content-Type': 'application/octet-stream'
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) {
@@ -14041,7 +14041,7 @@
14041
14041
  }
14042
14042
 
14043
14043
  var Config = {
14044
- LIB_VERSION: '2.69.0'
14044
+ LIB_VERSION: '2.70.0'
14045
14045
  };
14046
14046
 
14047
14047
  /* eslint camelcase: "off", eqeqeq: "off" */