@splitsoftware/splitio-browserjs 0.6.1-rc.2 → 0.7.1-rc.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/CHANGES.txt +12 -0
- package/cjs/full/index.js +1 -3
- package/cjs/full/umd.js +0 -1
- package/cjs/index.js +1 -3
- package/cjs/settings/defaults.js +1 -1
- package/esm/full/index.js +0 -1
- package/esm/full/umd.js +1 -2
- package/esm/index.js +0 -1
- package/esm/settings/defaults.js +1 -1
- package/package.json +8 -6
- package/scripts/ga-to-split-autorequire.js +1 -0
- package/src/full/index.ts +0 -1
- package/src/full/umd.ts +1 -2
- package/src/index.ts +0 -1
- package/src/settings/defaults.ts +1 -1
- package/types/full/index.d.ts +2 -7
- package/types/index.d.ts +2 -7
- package/types/splitio.d.ts +13 -56
package/CHANGES.txt
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
0.8.0 (July 22, 2022)
|
|
2
|
+
- Added `autoRequire` configuration option to the Google Analytics to Split integration, which takes care of requiring the splitTracker plugin on trackers dynamically created by Google tag managers (See https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js).
|
|
3
|
+
- Updated browser listener to push remaining impressions and events on 'visibilitychange' and 'pagehide' DOM events, instead of 'unload', which is not reliable in modern mobile and desktop Web browsers.
|
|
4
|
+
- Updated the synchronization flow to be more reliable in the event of an edge case generating delay in cache purge propagation, keeping the SDK cache properly synced.
|
|
5
|
+
- Updated some dependencies for vulnerability fixes.
|
|
6
|
+
|
|
7
|
+
0.7.0 (June 29, 2022)
|
|
8
|
+
- Added a new config option to control the tasks that listen or poll for updates on feature flags and segments, via the new config sync.enabled . Running online Split will always pull the most recent updates upon initialization, this only affects updates fetching on a running instance. Useful when a consistent session experience is a must or to save resources when updates are not being used.
|
|
9
|
+
- Updated telemetry logic to track the anonymous config for user consent flag set to declined or unknown.
|
|
10
|
+
- Updated submitters logic, to avoid duplicating the post of impressions to Split cloud when the SDK is destroyed while its periodic post of impressions is running.
|
|
11
|
+
- Bugfixing - Updated submitters logic, to avoid dropping impressions and events that are being tracked while POST request is pending.
|
|
12
|
+
|
|
1
13
|
0.6.0 (May 24, 2022)
|
|
2
14
|
- Added `scheduler.telemetryRefreshRate` property to SDK configuration.
|
|
3
15
|
- Updated SDK telemetry storage, metrics and updater to be more effective and send less often.
|
package/cjs/full/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PluggableStorage = exports.DebugLogger = exports.InfoLogger = exports.WarnLogger = exports.ErrorLogger = exports.SplitToGoogleAnalytics = exports.GoogleAnalyticsToSplit = exports.InLocalStorage = exports.SplitFactory = void 0;
|
|
4
4
|
var splitFactory_1 = require("./splitFactory");
|
|
5
5
|
Object.defineProperty(exports, "SplitFactory", { enumerable: true, get: function () { return splitFactory_1.SplitFactory; } });
|
|
6
6
|
var index_1 = require("@splitsoftware/splitio-commons/cjs/storages/inLocalStorage/index");
|
|
@@ -19,5 +19,3 @@ var DebugLogger_1 = require("@splitsoftware/splitio-commons/cjs/logger/browser/D
|
|
|
19
19
|
Object.defineProperty(exports, "DebugLogger", { enumerable: true, get: function () { return DebugLogger_1.DebugLogger; } });
|
|
20
20
|
var pluggable_1 = require("@splitsoftware/splitio-commons/cjs/storages/pluggable");
|
|
21
21
|
Object.defineProperty(exports, "PluggableStorage", { enumerable: true, get: function () { return pluggable_1.PluggableStorage; } });
|
|
22
|
-
var dataLoader_1 = require("@splitsoftware/splitio-commons/cjs/storages/dataLoader");
|
|
23
|
-
Object.defineProperty(exports, "DataLoaderFactory", { enumerable: true, get: function () { return dataLoader_1.DataLoaderFactory; } });
|
package/cjs/full/umd.js
CHANGED
|
@@ -11,6 +11,5 @@ index_1.SplitFactory.ErrorLogger = index_1.ErrorLogger;
|
|
|
11
11
|
index_1.SplitFactory.WarnLogger = index_1.WarnLogger;
|
|
12
12
|
index_1.SplitFactory.InfoLogger = index_1.InfoLogger;
|
|
13
13
|
index_1.SplitFactory.DebugLogger = index_1.DebugLogger;
|
|
14
|
-
index_1.SplitFactory.DataLoaderFactory = index_1.DataLoaderFactory;
|
|
15
14
|
// eslint-disable-next-line import/no-default-export
|
|
16
15
|
exports.default = index_1.SplitFactory;
|
package/cjs/index.js
CHANGED
|
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
|
|
|
15
15
|
limitations under the License.
|
|
16
16
|
**/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.PluggableStorage = exports.LocalhostFromObject = exports.DebugLogger = exports.InfoLogger = exports.WarnLogger = exports.ErrorLogger = exports.SplitToGoogleAnalytics = exports.GoogleAnalyticsToSplit = exports.InLocalStorage = exports.SplitFactory = void 0;
|
|
19
19
|
var splitFactory_1 = require("./splitFactory");
|
|
20
20
|
Object.defineProperty(exports, "SplitFactory", { enumerable: true, get: function () { return splitFactory_1.SplitFactory; } });
|
|
21
21
|
var index_1 = require("@splitsoftware/splitio-commons/cjs/storages/inLocalStorage/index");
|
|
@@ -36,5 +36,3 @@ var LocalhostFromObject_1 = require("@splitsoftware/splitio-commons/cjs/sync/off
|
|
|
36
36
|
Object.defineProperty(exports, "LocalhostFromObject", { enumerable: true, get: function () { return LocalhostFromObject_1.LocalhostFromObject; } });
|
|
37
37
|
var pluggable_1 = require("@splitsoftware/splitio-commons/cjs/storages/pluggable");
|
|
38
38
|
Object.defineProperty(exports, "PluggableStorage", { enumerable: true, get: function () { return pluggable_1.PluggableStorage; } });
|
|
39
|
-
var dataLoader_1 = require("@splitsoftware/splitio-commons/cjs/storages/dataLoader");
|
|
40
|
-
Object.defineProperty(exports, "DataLoaderFactory", { enumerable: true, get: function () { return dataLoader_1.DataLoaderFactory; } });
|
package/cjs/settings/defaults.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.defaults = void 0;
|
|
4
4
|
var index_1 = require("@splitsoftware/splitio-commons/cjs/logger/index");
|
|
5
5
|
var constants_1 = require("@splitsoftware/splitio-commons/cjs/utils/constants");
|
|
6
|
-
var packageVersion = '0.
|
|
6
|
+
var packageVersion = '0.7.1-rc.0';
|
|
7
7
|
/**
|
|
8
8
|
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
|
|
9
9
|
* Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
|
package/esm/full/index.js
CHANGED
|
@@ -7,4 +7,3 @@ export { WarnLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/Wa
|
|
|
7
7
|
export { InfoLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/InfoLogger';
|
|
8
8
|
export { DebugLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/DebugLogger';
|
|
9
9
|
export { PluggableStorage } from '@splitsoftware/splitio-commons/esm/storages/pluggable';
|
|
10
|
-
export { DataLoaderFactory } from '@splitsoftware/splitio-commons/esm/storages/dataLoader';
|
package/esm/full/umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { SplitFactory, InLocalStorage, GoogleAnalyticsToSplit, SplitToGoogleAnalytics, ErrorLogger, WarnLogger, InfoLogger, DebugLogger
|
|
2
|
+
import { SplitFactory, InLocalStorage, GoogleAnalyticsToSplit, SplitToGoogleAnalytics, ErrorLogger, WarnLogger, InfoLogger, DebugLogger } from './index';
|
|
3
3
|
// Include all pluggable modules as properties to expose at the global `splitio` object
|
|
4
4
|
SplitFactory.SplitFactory = SplitFactory;
|
|
5
5
|
SplitFactory.InLocalStorage = InLocalStorage;
|
|
@@ -9,6 +9,5 @@ SplitFactory.ErrorLogger = ErrorLogger;
|
|
|
9
9
|
SplitFactory.WarnLogger = WarnLogger;
|
|
10
10
|
SplitFactory.InfoLogger = InfoLogger;
|
|
11
11
|
SplitFactory.DebugLogger = DebugLogger;
|
|
12
|
-
SplitFactory.DataLoaderFactory = DataLoaderFactory;
|
|
13
12
|
// eslint-disable-next-line import/no-default-export
|
|
14
13
|
export default SplitFactory;
|
package/esm/index.js
CHANGED
|
@@ -23,4 +23,3 @@ export { InfoLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/In
|
|
|
23
23
|
export { DebugLogger } from '@splitsoftware/splitio-commons/esm/logger/browser/DebugLogger';
|
|
24
24
|
export { LocalhostFromObject } from '@splitsoftware/splitio-commons/esm/sync/offline/LocalhostFromObject';
|
|
25
25
|
export { PluggableStorage } from '@splitsoftware/splitio-commons/esm/storages/pluggable';
|
|
26
|
-
export { DataLoaderFactory } from '@splitsoftware/splitio-commons/esm/storages/dataLoader';
|
package/esm/settings/defaults.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/esm/logger/index';
|
|
2
2
|
import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/esm/utils/constants';
|
|
3
|
-
var packageVersion = '0.
|
|
3
|
+
var packageVersion = '0.7.1-rc.0';
|
|
4
4
|
/**
|
|
5
5
|
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
|
|
6
6
|
* Acceptable values are: 'DEBUG', 'INFO', 'WARN', 'ERROR', 'NONE'.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splitsoftware/splitio-browserjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1-rc.0",
|
|
4
4
|
"description": "Split SDK for Javascript on Browser",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"esm",
|
|
15
15
|
"src",
|
|
16
16
|
"types",
|
|
17
|
-
"full"
|
|
17
|
+
"full",
|
|
18
|
+
"scripts/ga-to-split-autorequire.js"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
21
|
"check": "npm run check:lint && npm run check:types && npm run check:version",
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
"build:cjs": "rimraf cjs && tsc -outDir cjs -m CommonJS && ./scripts/build_cjs_replace_imports.sh",
|
|
27
28
|
"build:umd-visualizer": "rollup --config rollup.visualizer.config.js",
|
|
28
29
|
"build:umd": "rollup --config rollup.ci.config.js --branch=$BUILD_BRANCH --commit_hash=$BUILD_COMMIT",
|
|
30
|
+
"build:ga-to-split-autorequire": "terser ./node_modules/@splitsoftware/splitio-commons/src/integrations/ga/autoRequire.js --mangle --output ./scripts/ga-to-split-autorequire.js",
|
|
29
31
|
"test": "npm run test:unit && npm run test:e2e",
|
|
30
32
|
"test:unit": "jest",
|
|
31
33
|
"test:e2e": "npm run test:e2e-logger && npm run test:e2e-offline && npm run test:e2e-online && npm run test:e2e-destroy && npm run test:e2e-errors && npm run test:e2e-push && npm run test:e2e-gaintegration && npm run test:e2e-consumer",
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
"bugs": "https://github.com/splitio/javascript-browser-client/issues",
|
|
62
64
|
"homepage": "https://github.com/splitio/javascript-browser-client#readme",
|
|
63
65
|
"dependencies": {
|
|
64
|
-
"@splitsoftware/splitio-commons": "1.
|
|
66
|
+
"@splitsoftware/splitio-commons": "1.6.1",
|
|
65
67
|
"@types/google.analytics": "0.0.40"
|
|
66
68
|
},
|
|
67
69
|
"devDependencies": {
|
|
@@ -77,9 +79,9 @@
|
|
|
77
79
|
"eslint-plugin-import": "^2.25.4",
|
|
78
80
|
"fetch-mock": "^9.11.0",
|
|
79
81
|
"jest": "^27.2.3",
|
|
80
|
-
"karma": "^6.
|
|
81
|
-
"karma-chrome-launcher": "^3.1.
|
|
82
|
-
"karma-rollup-preprocessor": "^7.0.
|
|
82
|
+
"karma": "^6.4.0",
|
|
83
|
+
"karma-chrome-launcher": "^3.1.1",
|
|
84
|
+
"karma-rollup-preprocessor": "^7.0.8",
|
|
83
85
|
"karma-tap": "^4.2.0",
|
|
84
86
|
"replace": "^1.2.1",
|
|
85
87
|
"rimraf": "^3.0.2",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n,t,e){n[e]=n[e]||t;n[t]=n[t]||function(){n[t].q.push(arguments)};n[t].q=n[t].q||[];var r={};function i(n){return typeof n==="object"&&typeof n.name==="string"&&n.name}function o(e){if(e&&e[0]==="create"){var o=i(e[1])||i(e[2])||i(e[3])||(typeof e[3]==="string"?e[3]:undefined);if(!r[o]){r[o]=true;n[t]((o?o+".":"")+"require","splitTracker")}}}n[t].q.forEach(o);var u=n[t].q.push;n[t].q.push=function(n){var t=u.apply(this,arguments);o(n);return t}})(window,"ga","GoogleAnalyticsObject");
|
package/src/full/index.ts
CHANGED
|
@@ -7,4 +7,3 @@ export { WarnLogger } from '@splitsoftware/splitio-commons/src/logger/browser/Wa
|
|
|
7
7
|
export { InfoLogger } from '@splitsoftware/splitio-commons/src/logger/browser/InfoLogger';
|
|
8
8
|
export { DebugLogger } from '@splitsoftware/splitio-commons/src/logger/browser/DebugLogger';
|
|
9
9
|
export { PluggableStorage } from '@splitsoftware/splitio-commons/src/storages/pluggable';
|
|
10
|
-
export { DataLoaderFactory } from '@splitsoftware/splitio-commons/src/storages/dataLoader';
|
package/src/full/umd.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { SplitFactory, InLocalStorage, GoogleAnalyticsToSplit, SplitToGoogleAnalytics, ErrorLogger, WarnLogger, InfoLogger, DebugLogger
|
|
2
|
+
import { SplitFactory, InLocalStorage, GoogleAnalyticsToSplit, SplitToGoogleAnalytics, ErrorLogger, WarnLogger, InfoLogger, DebugLogger } from './index';
|
|
3
3
|
|
|
4
4
|
// Include all pluggable modules as properties to expose at the global `splitio` object
|
|
5
5
|
SplitFactory.SplitFactory = SplitFactory;
|
|
@@ -10,7 +10,6 @@ SplitFactory.ErrorLogger = ErrorLogger;
|
|
|
10
10
|
SplitFactory.WarnLogger = WarnLogger;
|
|
11
11
|
SplitFactory.InfoLogger = InfoLogger;
|
|
12
12
|
SplitFactory.DebugLogger = DebugLogger;
|
|
13
|
-
SplitFactory.DataLoaderFactory = DataLoaderFactory;
|
|
14
13
|
|
|
15
14
|
// eslint-disable-next-line import/no-default-export
|
|
16
15
|
export default SplitFactory;
|
package/src/index.ts
CHANGED
|
@@ -24,4 +24,3 @@ export { InfoLogger } from '@splitsoftware/splitio-commons/src/logger/browser/In
|
|
|
24
24
|
export { DebugLogger } from '@splitsoftware/splitio-commons/src/logger/browser/DebugLogger';
|
|
25
25
|
export { LocalhostFromObject } from '@splitsoftware/splitio-commons/src/sync/offline/LocalhostFromObject';
|
|
26
26
|
export { PluggableStorage } from '@splitsoftware/splitio-commons/src/storages/pluggable';
|
|
27
|
-
export { DataLoaderFactory } from '@splitsoftware/splitio-commons/src/storages/dataLoader';
|
package/src/settings/defaults.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LogLevels, isLogLevelString } from '@splitsoftware/splitio-commons/src/
|
|
|
2
2
|
import { ConsentStatus, LogLevel } from '@splitsoftware/splitio-commons/src/types';
|
|
3
3
|
import { CONSENT_GRANTED } from '@splitsoftware/splitio-commons/src/utils/constants';
|
|
4
4
|
|
|
5
|
-
const packageVersion = '0.
|
|
5
|
+
const packageVersion = '0.7.1-rc.0';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* In browser, the default debug level, can be set via the `localStorage.splitio_debug` item.
|
package/types/full/index.d.ts
CHANGED
|
@@ -35,14 +35,14 @@ declare module JsSdk {
|
|
|
35
35
|
/**
|
|
36
36
|
* Enable 'Google Analytics to Split' integration, to track Google Analytics hits as Split events.
|
|
37
37
|
*
|
|
38
|
-
* @see {@link https://help.split.io/hc/en-us/articles/
|
|
38
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360040838752#google-analytics-to-split}
|
|
39
39
|
*/
|
|
40
40
|
export function GoogleAnalyticsToSplit(options?: SplitIO.GoogleAnalyticsToSplitOptions): SplitIO.IntegrationFactory;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Enable 'Split to Google Analytics' integration, to track Split impressions and events as Google Analytics hits.
|
|
44
44
|
*
|
|
45
|
-
* @see {@link https://help.split.io/hc/en-us/articles/
|
|
45
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360040838752#split-to-google-analytics}
|
|
46
46
|
*/
|
|
47
47
|
export function SplitToGoogleAnalytics(options?: SplitIO.SplitToGoogleAnalyticsOptions): SplitIO.IntegrationFactory;
|
|
48
48
|
|
|
@@ -74,9 +74,4 @@ declare module JsSdk {
|
|
|
74
74
|
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#logging}
|
|
75
75
|
*/
|
|
76
76
|
export function ErrorLogger(): SplitIO.ILogger;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* @TODO
|
|
80
|
-
*/
|
|
81
|
-
export function DataLoaderFactory(preloadedData: SplitIO.PreloadedData): SplitIO.DataLoader;
|
|
82
77
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -35,14 +35,14 @@ declare module JsSdk {
|
|
|
35
35
|
/**
|
|
36
36
|
* Enable 'Google Analytics to Split' integration, to track Google Analytics hits as Split events.
|
|
37
37
|
*
|
|
38
|
-
* @see {@link https://help.split.io/hc/en-us/articles/
|
|
38
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360040838752#google-analytics-to-split}
|
|
39
39
|
*/
|
|
40
40
|
export function GoogleAnalyticsToSplit(options?: SplitIO.GoogleAnalyticsToSplitOptions): SplitIO.IntegrationFactory;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Enable 'Split to Google Analytics' integration, to track Split impressions and events as Google Analytics hits.
|
|
44
44
|
*
|
|
45
|
-
* @see {@link https://help.split.io/hc/en-us/articles/
|
|
45
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360040838752#split-to-google-analytics}
|
|
46
46
|
*/
|
|
47
47
|
export function SplitToGoogleAnalytics(options?: SplitIO.SplitToGoogleAnalyticsOptions): SplitIO.IntegrationFactory;
|
|
48
48
|
|
|
@@ -82,9 +82,4 @@ declare module JsSdk {
|
|
|
82
82
|
* @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#localhost-mode}
|
|
83
83
|
*/
|
|
84
84
|
export function LocalhostFromObject(): SplitIO.LocalhostFactory;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* @TODO
|
|
88
|
-
*/
|
|
89
|
-
export function DataLoaderFactory(preloadedData: SplitIO.PreloadedData): SplitIO.DataLoader;
|
|
90
85
|
}
|
package/types/splitio.d.ts
CHANGED
|
@@ -73,7 +73,6 @@ interface ISettings {
|
|
|
73
73
|
eventsFirstPushWindow: number
|
|
74
74
|
},
|
|
75
75
|
readonly storage?: SplitIO.StorageSyncFactory | SplitIO.StorageAsyncFactory,
|
|
76
|
-
readonly dataLoader?: SplitIO.DataLoader,
|
|
77
76
|
readonly urls: {
|
|
78
77
|
events: string,
|
|
79
78
|
sdk: string,
|
|
@@ -94,7 +93,6 @@ interface ISettings {
|
|
|
94
93
|
impressionsMode: SplitIO.ImpressionsMode,
|
|
95
94
|
localhostMode?: SplitIO.LocalhostFactory,
|
|
96
95
|
enabled?: boolean
|
|
97
|
-
onlySubmitters?: boolean
|
|
98
96
|
},
|
|
99
97
|
readonly userConsent: SplitIO.ConsentStatus
|
|
100
98
|
}
|
|
@@ -255,14 +253,6 @@ interface ISharedSettings {
|
|
|
255
253
|
* @default true
|
|
256
254
|
*/
|
|
257
255
|
enabled?: boolean
|
|
258
|
-
/*
|
|
259
|
-
* @TODO
|
|
260
|
-
*
|
|
261
|
-
* False by default.
|
|
262
|
-
* If true and standalone mode, it will DISABLE splits and segments synchronization (i.e., polling and streaming).
|
|
263
|
-
* In consumer and partial consumer mode, it has no effect
|
|
264
|
-
*/
|
|
265
|
-
onlySubmitters?: boolean
|
|
266
256
|
}
|
|
267
257
|
}
|
|
268
258
|
/**
|
|
@@ -553,10 +543,6 @@ declare namespace SplitIO {
|
|
|
553
543
|
*/
|
|
554
544
|
prefix?: string
|
|
555
545
|
}
|
|
556
|
-
/**
|
|
557
|
-
* @TODO
|
|
558
|
-
*/
|
|
559
|
-
type DataLoader = (storage: StorageSync, key?: string) => void
|
|
560
546
|
/**
|
|
561
547
|
* Storage for asynchronous (consumer) SDK.
|
|
562
548
|
* Its interface details are not part of the public API.
|
|
@@ -642,7 +628,7 @@ declare namespace SplitIO {
|
|
|
642
628
|
/**
|
|
643
629
|
* Configuration params for 'Google Analytics to Split' integration plugin, to track Google Analytics hits as Split events.
|
|
644
630
|
*
|
|
645
|
-
* @see {@link https://help.split.io/hc/en-us/articles/
|
|
631
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360040838752#google-analytics-to-split}
|
|
646
632
|
*/
|
|
647
633
|
interface GoogleAnalyticsToSplitOptions {
|
|
648
634
|
/**
|
|
@@ -683,6 +669,17 @@ declare namespace SplitIO {
|
|
|
683
669
|
* If not provided, events are sent using the key and traffic type provided at SDK config.
|
|
684
670
|
*/
|
|
685
671
|
identities: Identity[],
|
|
672
|
+
/**
|
|
673
|
+
* Optional flag to log an error if the `auto-require` script is not detected.
|
|
674
|
+
* The auto-require script automatically requires the `splitTracker` plugin for created trackers,
|
|
675
|
+
* and should be placed right after your Google Analytics, Google Tag Manager or gtag.js script tag.
|
|
676
|
+
*
|
|
677
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360040838752#set-up-with-gtm-and-gtag.js}
|
|
678
|
+
*
|
|
679
|
+
* @property {boolean} autoRequire
|
|
680
|
+
* @default false
|
|
681
|
+
*/
|
|
682
|
+
autoRequire?: boolean,
|
|
686
683
|
}
|
|
687
684
|
/**
|
|
688
685
|
* Object representing the data sent by Split (events and impressions).
|
|
@@ -694,7 +691,7 @@ declare namespace SplitIO {
|
|
|
694
691
|
/**
|
|
695
692
|
* Configuration params for 'Split to Google Analytics' integration plugin, to track Split impressions and events as Google Analytics hits.
|
|
696
693
|
*
|
|
697
|
-
* @see {@link https://help.split.io/hc/en-us/articles/
|
|
694
|
+
* @see {@link https://help.split.io/hc/en-us/articles/360040838752#split-to-google-analytics}
|
|
698
695
|
*/
|
|
699
696
|
interface SplitToGoogleAnalyticsOptions {
|
|
700
697
|
/**
|
|
@@ -813,42 +810,6 @@ declare namespace SplitIO {
|
|
|
813
810
|
* @typedef {string} ImpressionsMode
|
|
814
811
|
*/
|
|
815
812
|
type ImpressionsMode = 'OPTIMIZED' | 'DEBUG';
|
|
816
|
-
/**
|
|
817
|
-
* Defines the format of Split data to preload on the factory storage (cache).
|
|
818
|
-
*/
|
|
819
|
-
interface PreloadedData {
|
|
820
|
-
/**
|
|
821
|
-
* Timestamp of the last moment the data was synchronized with Split servers.
|
|
822
|
-
* If this value is older than 10 days ago (expiration time policy), the data is not used to update the storage content.
|
|
823
|
-
* @TODO configurable expiration time policy?
|
|
824
|
-
*/
|
|
825
|
-
lastUpdated: number,
|
|
826
|
-
/**
|
|
827
|
-
* Change number of the preloaded data.
|
|
828
|
-
* If this value is older than the current changeNumber at the storage, the data is not used to update the storage content.
|
|
829
|
-
*/
|
|
830
|
-
since: number,
|
|
831
|
-
/**
|
|
832
|
-
* Map of splits to their serialized definitions.
|
|
833
|
-
*/
|
|
834
|
-
splitsData: {
|
|
835
|
-
[splitName: string]: string
|
|
836
|
-
},
|
|
837
|
-
/**
|
|
838
|
-
* Optional map of user keys to their list of segments.
|
|
839
|
-
* @TODO remove when releasing first version
|
|
840
|
-
*/
|
|
841
|
-
mySegmentsData?: {
|
|
842
|
-
[key: string]: string[]
|
|
843
|
-
},
|
|
844
|
-
/**
|
|
845
|
-
* Optional map of segments to their serialized definitions.
|
|
846
|
-
* This property is ignored if `mySegmentsData` was provided.
|
|
847
|
-
*/
|
|
848
|
-
segmentsData?: {
|
|
849
|
-
[segmentName: string]: string
|
|
850
|
-
},
|
|
851
|
-
}
|
|
852
813
|
/**
|
|
853
814
|
* User consent status.
|
|
854
815
|
* @typedef {string} ConsentStatus
|
|
@@ -954,10 +915,6 @@ declare namespace SplitIO {
|
|
|
954
915
|
* @property {Object} storage
|
|
955
916
|
*/
|
|
956
917
|
storage?: StorageSyncFactory,
|
|
957
|
-
/**
|
|
958
|
-
* @TODO
|
|
959
|
-
*/
|
|
960
|
-
dataLoader?: DataLoader,
|
|
961
918
|
/**
|
|
962
919
|
* SDK Startup settings for the Browser.
|
|
963
920
|
* @property {Object} startup
|