Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amplitude/analytics-browser

Package Overview
Dependencies
Maintainers
21
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/analytics-browser - npm Package Compare versions

Comparing version 2.10.0 to 2.11.0

55

lib/cjs/config/joined-config.js

@@ -31,29 +31,54 @@ var _this = this;

BrowserJoinedConfigGenerator.prototype.generateJoinedConfig = function () {
var _a, _b;
var _c;
var _a, _b, _c, _d;
var _e;
return tslib_1.__awaiter(this, void 0, void 0, function () {
var remoteConfig, _d, e_1;
return tslib_1.__generator(this, function (_e) {
switch (_e.label) {
var remoteConfig, _f, e_1;
return tslib_1.__generator(this, function (_g) {
switch (_g.label) {
case 0:
_e.trys.push([0, 3, , 4]);
_d = this.remoteConfigFetch;
if (!_d) return [3 /*break*/, 2];
_g.trys.push([0, 3, , 4]);
_f = this.remoteConfigFetch;
if (!_f) return [3 /*break*/, 2];
return [4 /*yield*/, this.remoteConfigFetch.getRemoteConfig('analyticsSDK', 'browserSDK', this.config.sessionId)];
case 1:
_d = (_e.sent());
_e.label = 2;
_f = (_g.sent());
_g.label = 2;
case 2:
remoteConfig = _d;
remoteConfig = _f;
this.config.loggerProvider.debug('Remote configuration:', JSON.stringify(remoteConfig, null, 2));
// merge remoteConfig.autocapture and this.config.autocapture
// if a field is in remoteConfig.autocapture, use that value
// if a field is not in remoteConfig.autocapture, use the value from this.config.autocapture
if (remoteConfig && 'autocapture' in remoteConfig) {
this.config.autocapture = remoteConfig.autocapture;
if (typeof remoteConfig.autocapture === 'boolean') {
this.config.autocapture = remoteConfig.autocapture;
}
if (typeof remoteConfig.autocapture === 'object') {
if (this.config.autocapture === undefined) {
this.config.autocapture = remoteConfig.autocapture;
}
if (typeof this.config.autocapture === 'boolean') {
this.config.autocapture = tslib_1.__assign({ attribution: this.config.autocapture, fileDownloads: this.config.autocapture, formInteractions: this.config.autocapture, pageViews: this.config.autocapture, sessions: this.config.autocapture, elementInteractions: this.config.autocapture }, remoteConfig.autocapture);
}
if (typeof this.config.autocapture === 'object') {
this.config.autocapture = tslib_1.__assign(tslib_1.__assign({}, this.config.autocapture), remoteConfig.autocapture);
}
}
// Override default tracking options if autocapture is updated by remote config
this.config.defaultTracking = this.config.autocapture;
}
this.config.loggerProvider.debug('Joined configuration: ', JSON.stringify(this.config, null, 2));
(_a = (_c = this.config).requestMetadata) !== null && _a !== void 0 ? _a : (_c.requestMetadata = new analytics_core_1.RequestMetadata());
this.config.requestMetadata.recordHistogram('remote_config_fetch_time', (_b = this.remoteConfigFetch) === null || _b === void 0 ? void 0 : _b.fetchTime);
(_a = (_e = this.config).requestMetadata) !== null && _a !== void 0 ? _a : (_e.requestMetadata = new analytics_core_1.RequestMetadata());
if ((_b = this.remoteConfigFetch) === null || _b === void 0 ? void 0 : _b.metrics.fetchTimeIDB) {
this.config.requestMetadata.recordHistogram('remote_config_fetch_time_IDB', this.remoteConfigFetch.metrics.fetchTimeIDB);
}
if ((_c = this.remoteConfigFetch) === null || _c === void 0 ? void 0 : _c.metrics.fetchTimeAPISuccess) {
this.config.requestMetadata.recordHistogram('remote_config_fetch_time_API_success', this.remoteConfigFetch.metrics.fetchTimeAPISuccess);
}
if ((_d = this.remoteConfigFetch) === null || _d === void 0 ? void 0 : _d.metrics.fetchTimeAPIFail) {
this.config.requestMetadata.recordHistogram('remote_config_fetch_time_API_fail', this.remoteConfigFetch.metrics.fetchTimeAPIFail);
}
return [3 /*break*/, 4];
case 3:
e_1 = _e.sent();
e_1 = _g.sent();
this.config.loggerProvider.error('Failed to fetch remote configuration because of error: ', e_1);

@@ -60,0 +85,0 @@ return [3 /*break*/, 4];

@@ -1,2 +0,2 @@

export declare const VERSION = "2.10.0";
export declare const VERSION = "2.11.0";
//# sourceMappingURL=version.d.ts.map
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
exports.VERSION = '2.10.0';
exports.VERSION = '2.11.0';
//# sourceMappingURL=version.js.map

@@ -1,2 +0,2 @@

import { __awaiter, __generator } from "tslib";
import { __assign, __awaiter, __generator } from "tslib";
import { createRemoteConfigFetch } from '@amplitude/analytics-remote-config';

@@ -28,29 +28,54 @@ import { RequestMetadata } from '@amplitude/analytics-core';

BrowserJoinedConfigGenerator.prototype.generateJoinedConfig = function () {
var _a, _b;
var _c;
var _a, _b, _c, _d;
var _e;
return __awaiter(this, void 0, void 0, function () {
var remoteConfig, _d, e_1;
return __generator(this, function (_e) {
switch (_e.label) {
var remoteConfig, _f, e_1;
return __generator(this, function (_g) {
switch (_g.label) {
case 0:
_e.trys.push([0, 3, , 4]);
_d = this.remoteConfigFetch;
if (!_d) return [3 /*break*/, 2];
_g.trys.push([0, 3, , 4]);
_f = this.remoteConfigFetch;
if (!_f) return [3 /*break*/, 2];
return [4 /*yield*/, this.remoteConfigFetch.getRemoteConfig('analyticsSDK', 'browserSDK', this.config.sessionId)];
case 1:
_d = (_e.sent());
_e.label = 2;
_f = (_g.sent());
_g.label = 2;
case 2:
remoteConfig = _d;
remoteConfig = _f;
this.config.loggerProvider.debug('Remote configuration:', JSON.stringify(remoteConfig, null, 2));
// merge remoteConfig.autocapture and this.config.autocapture
// if a field is in remoteConfig.autocapture, use that value
// if a field is not in remoteConfig.autocapture, use the value from this.config.autocapture
if (remoteConfig && 'autocapture' in remoteConfig) {
this.config.autocapture = remoteConfig.autocapture;
if (typeof remoteConfig.autocapture === 'boolean') {
this.config.autocapture = remoteConfig.autocapture;
}
if (typeof remoteConfig.autocapture === 'object') {
if (this.config.autocapture === undefined) {
this.config.autocapture = remoteConfig.autocapture;
}
if (typeof this.config.autocapture === 'boolean') {
this.config.autocapture = __assign({ attribution: this.config.autocapture, fileDownloads: this.config.autocapture, formInteractions: this.config.autocapture, pageViews: this.config.autocapture, sessions: this.config.autocapture, elementInteractions: this.config.autocapture }, remoteConfig.autocapture);
}
if (typeof this.config.autocapture === 'object') {
this.config.autocapture = __assign(__assign({}, this.config.autocapture), remoteConfig.autocapture);
}
}
// Override default tracking options if autocapture is updated by remote config
this.config.defaultTracking = this.config.autocapture;
}
this.config.loggerProvider.debug('Joined configuration: ', JSON.stringify(this.config, null, 2));
(_a = (_c = this.config).requestMetadata) !== null && _a !== void 0 ? _a : (_c.requestMetadata = new RequestMetadata());
this.config.requestMetadata.recordHistogram('remote_config_fetch_time', (_b = this.remoteConfigFetch) === null || _b === void 0 ? void 0 : _b.fetchTime);
(_a = (_e = this.config).requestMetadata) !== null && _a !== void 0 ? _a : (_e.requestMetadata = new RequestMetadata());
if ((_b = this.remoteConfigFetch) === null || _b === void 0 ? void 0 : _b.metrics.fetchTimeIDB) {
this.config.requestMetadata.recordHistogram('remote_config_fetch_time_IDB', this.remoteConfigFetch.metrics.fetchTimeIDB);
}
if ((_c = this.remoteConfigFetch) === null || _c === void 0 ? void 0 : _c.metrics.fetchTimeAPISuccess) {
this.config.requestMetadata.recordHistogram('remote_config_fetch_time_API_success', this.remoteConfigFetch.metrics.fetchTimeAPISuccess);
}
if ((_d = this.remoteConfigFetch) === null || _d === void 0 ? void 0 : _d.metrics.fetchTimeAPIFail) {
this.config.requestMetadata.recordHistogram('remote_config_fetch_time_API_fail', this.remoteConfigFetch.metrics.fetchTimeAPIFail);
}
return [3 /*break*/, 4];
case 3:
e_1 = _e.sent();
e_1 = _g.sent();
this.config.loggerProvider.error('Failed to fetch remote configuration because of error: ', e_1);

@@ -57,0 +82,0 @@ return [3 /*break*/, 4];

@@ -1,2 +0,2 @@

export declare const VERSION = "2.10.0";
export declare const VERSION = "2.11.0";
//# sourceMappingURL=version.d.ts.map

@@ -1,2 +0,2 @@

export var VERSION = '2.10.0';
export var VERSION = '2.11.0';
//# sourceMappingURL=version.js.map

@@ -1,1 +0,1 @@

!function(){"use strict";!function(e,t){var r=e.amplitude||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},i=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(i(e,t,Array.prototype.slice.call(arguments)))}}},s=function(e){for(var t=0;t<v.length;t++)o(e,v[t],!1);for(var r=0;r<y.length;r++)o(e,y[r],!0)};r.invoked=!0;var a=t.getElementsByTagName("script")[0],u=t.createElement("script");u.src="https://cdn.amplitude.com/libs/plugin-autocapture-browser-0.9.0-min.js.gz",u.async=!1,a.parentNode.insertBefore(u,a);var c=t.createElement("script");c.type="text/javascript",c.integrity="sha384-8fNco6Xiv+HOa+SIVGKVjByyY5LyircydGlHS9mXcHJpapcgF98L6UNOlauMTxJq",c.crossOrigin="anonymous",c.async=!1,c.src="https://cdn.amplitude.com/libs/analytics-browser-2.10.0-min.js.gz",c.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),e.amplitude.init("YOUR_API_KEY","YOUR_USER_ID",{instanceName:"amplitude-bookmarklet",serverZone:"YOUR_SERVER_ZONE",ingestionMetadata:{sourceName:"browser-typescript-bookmarklet",sourceVersion:"1.0.0"},optOut:!1}),amplitudeAutocapturePlugin&&amplitudeAutocapturePlugin.autocapturePlugin&&"function"==typeof amplitudeAutocapturePlugin.autocapturePlugin&&e.amplitude.add(amplitudeAutocapturePlugin.autocapturePlugin()),alert("Amplitude is now tracking events!")},a.parentNode.insertBefore(c,a);for(var p=function(){return this._q=[],this},l=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],d=0;d<l.length;d++)n(p,l[d]);r.Identify=p;for(var m=function(){return this._q=[],this},g=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],f=0;f<g.length;f++)n(m,g[f]);r.Revenue=m;var v=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],y=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];s(r),r.createInstance=function(e){return r._iq[e]={_q:[]},s(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();
!function(){"use strict";!function(e,t){var r=e.amplitude||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},i=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(i(e,t,Array.prototype.slice.call(arguments)))}}},s=function(e){for(var t=0;t<v.length;t++)o(e,v[t],!1);for(var r=0;r<y.length;r++)o(e,y[r],!0)};r.invoked=!0;var a=t.getElementsByTagName("script")[0],u=t.createElement("script");u.src="https://cdn.amplitude.com/libs/plugin-autocapture-browser-0.9.0-min.js.gz",u.async=!1,a.parentNode.insertBefore(u,a);var c=t.createElement("script");c.type="text/javascript",c.integrity="sha384-pY2pkwHaLM/6UIseFHVU3hOKr6oAvhLcdYkoRZyaMDWLjpM6B7nTxtOdE823WAOQ",c.crossOrigin="anonymous",c.async=!1,c.src="https://cdn.amplitude.com/libs/analytics-browser-2.11.0-min.js.gz",c.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK"),e.amplitude.init("YOUR_API_KEY","YOUR_USER_ID",{instanceName:"amplitude-bookmarklet",serverZone:"YOUR_SERVER_ZONE",ingestionMetadata:{sourceName:"browser-typescript-bookmarklet",sourceVersion:"1.0.0"},optOut:!1}),amplitudeAutocapturePlugin&&amplitudeAutocapturePlugin.autocapturePlugin&&"function"==typeof amplitudeAutocapturePlugin.autocapturePlugin&&e.amplitude.add(amplitudeAutocapturePlugin.autocapturePlugin()),alert("Amplitude is now tracking events!")},a.parentNode.insertBefore(c,a);for(var p=function(){return this._q=[],this},l=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],d=0;d<l.length;d++)n(p,l[d]);r.Identify=p;for(var m=function(){return this._q=[],this},g=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],f=0;f<g.length;f++)n(m,g[f]);r.Revenue=m;var v=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],y=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];s(r),r.createInstance=function(e){return r._iq[e]={_q:[]},s(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();

@@ -1,1 +0,1 @@

!function(){"use strict";!function(e,t){var r=e.amplitudeGTM||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},s=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e._q.push({name:t,args:Array.prototype.slice.call(r,0)})},i=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))};o(e,t,Array.prototype.slice.call(arguments))}},a=function(e){for(var t=0;t<y.length;t++)i(e,y[t],!1);for(var r=0;r<g.length;r++)i(e,g[r],!0)};r.invoked=!0;var c=t.createElement("script");c.type="text/javascript",c.integrity="sha384-nRNSxMtRu/sc7M+QPYS9v7lJCEBcFz1y1kRDOpTrJlptLMchhPE8k0JI8Qa8xtEF",c.crossOrigin="anonymous",c.async=!0,c.src="https://cdn.amplitude.com/libs/analytics-browser-gtm-2.10.0-min.js.gz",c.onload=function(){e.amplitudeGTM.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var u=t.getElementsByTagName("script")[0];u.parentNode.insertBefore(c,u);for(var l=function(){return this._q=[],this},p=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],d=0;d<p.length;d++)n(l,p[d]);r.Identify=l;for(var f=function(){return this._q=[],this},v=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],m=0;m<v.length;m++)n(f,v[m]);r.Revenue=f;var y=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],g=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];a(r),r.createInstance=function(e){return r._iq[e]={_q:[]},a(r._iq[e]),r._iq[e]},e.amplitudeGTM=r,e.amplitude||(e.amplitude=e.amplitudeGTM)}}(window,document)}();
!function(){"use strict";!function(e,t){var r=e.amplitudeGTM||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},s=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e._q.push({name:t,args:Array.prototype.slice.call(r,0)})},i=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))};o(e,t,Array.prototype.slice.call(arguments))}},a=function(e){for(var t=0;t<h.length;t++)i(e,h[t],!1);for(var r=0;r<y.length;r++)i(e,y[r],!0)};r.invoked=!0;var u=t.createElement("script");u.type="text/javascript",u.integrity="sha384-ProY3h0mqOQVGXcVRuT4dFh8BOVMh8hauZ94L4BIrK831qVXv5uIv30A1Ql7+h7J",u.crossOrigin="anonymous",u.async=!0,u.src="https://cdn.amplitude.com/libs/analytics-browser-gtm-2.11.0-min.js.gz",u.onload=function(){e.amplitudeGTM.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var c=t.getElementsByTagName("script")[0];c.parentNode.insertBefore(u,c);for(var l=function(){return this._q=[],this},p=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],d=0;d<p.length;d++)n(l,p[d]);r.Identify=l;for(var v=function(){return this._q=[],this},f=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],m=0;m<f.length;m++)n(v,f[m]);r.Revenue=v;var h=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],y=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];a(r),r.createInstance=function(e){return r._iq[e]={_q:[]},a(r._iq[e]),r._iq[e]},e.amplitudeGTM=r,e.amplitude||(e.amplitude=e.amplitudeGTM)}}(window,document)}();

@@ -1,1 +0,1 @@

!function(){"use strict";!function(e,t){var r=e.amplitude||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},s=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e._q.push({name:t,args:Array.prototype.slice.call(r,0)})},i=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))};o(e,t,Array.prototype.slice.call(arguments))}},a=function(e){for(var t=0;t<g.length;t++)i(e,g[t],!1);for(var r=0;r<m.length;r++)i(e,m[r],!0)};r.invoked=!0;var c=t.createElement("script");c.type="text/javascript",c.integrity="sha384-8fNco6Xiv+HOa+SIVGKVjByyY5LyircydGlHS9mXcHJpapcgF98L6UNOlauMTxJq",c.crossOrigin="anonymous",c.async=!0,c.src="https://cdn.amplitude.com/libs/analytics-browser-2.10.0-min.js.gz",c.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var u=t.getElementsByTagName("script")[0];u.parentNode.insertBefore(c,u);for(var l=function(){return this._q=[],this},p=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],d=0;d<p.length;d++)n(l,p[d]);r.Identify=l;for(var f=function(){return this._q=[],this},y=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],v=0;v<y.length;v++)n(f,y[v]);r.Revenue=f;var g=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],m=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];a(r),r.createInstance=function(e){return r._iq[e]={_q:[]},a(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();
!function(){"use strict";!function(e,t){var r=e.amplitude||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},s=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e._q.push({name:t,args:Array.prototype.slice.call(r,0)})},i=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))};o(e,t,Array.prototype.slice.call(arguments))}},a=function(e){for(var t=0;t<g.length;t++)i(e,g[t],!1);for(var r=0;r<m.length;r++)i(e,m[r],!0)};r.invoked=!0;var c=t.createElement("script");c.type="text/javascript",c.integrity="sha384-pY2pkwHaLM/6UIseFHVU3hOKr6oAvhLcdYkoRZyaMDWLjpM6B7nTxtOdE823WAOQ",c.crossOrigin="anonymous",c.async=!0,c.src="https://cdn.amplitude.com/libs/analytics-browser-2.11.0-min.js.gz",c.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var u=t.getElementsByTagName("script")[0];u.parentNode.insertBefore(c,u);for(var p=function(){return this._q=[],this},l=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],d=0;d<l.length;d++)n(p,l[d]);r.Identify=p;for(var f=function(){return this._q=[],this},v=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],y=0;y<v.length;y++)n(f,v[y]);r.Revenue=f;var g=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],m=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];a(r),r.createInstance=function(e){return r._iq[e]={_q:[]},a(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();

@@ -1,2 +0,2 @@

export declare const VERSION = "2.10.0";
export declare const VERSION = "2.11.0";
//# sourceMappingURL=version.d.ts.map
{
"name": "@amplitude/analytics-browser",
"version": "2.10.0",
"version": "2.11.0",
"description": "Official Amplitude SDK for Web",

@@ -48,8 +48,8 @@ "keywords": [

"dependencies": {
"@amplitude/analytics-client-common": "^2.3.0",
"@amplitude/analytics-core": "^2.4.0",
"@amplitude/analytics-remote-config": "^0.3.0",
"@amplitude/analytics-types": "^2.7.0",
"@amplitude/analytics-client-common": "^2.3.1",
"@amplitude/analytics-core": "^2.5.0",
"@amplitude/analytics-remote-config": "^0.3.5",
"@amplitude/analytics-types": "^2.8.0",
"@amplitude/plugin-autocapture-browser": "^1.0.0",
"@amplitude/plugin-page-view-tracking-browser": "^2.2.18",
"@amplitude/plugin-page-view-tracking-browser": "^2.2.19",
"tslib": "^2.4.1"

@@ -73,3 +73,3 @@ },

],
"gitHead": "e9e623419f257678acac7f70402c4683d1c8107a"
"gitHead": "1a070ad8aa0b2d274802acbac5a92bbbe38d2257"
}

@@ -56,3 +56,3 @@ <p align="center">

<script type="text/javascript">
!function(){"use strict";!function(e,t){var r=e.amplitude||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},s=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e._q.push({name:t,args:Array.prototype.slice.call(r,0)})},i=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))};o(e,t,Array.prototype.slice.call(arguments))}},a=function(e){for(var t=0;t<g.length;t++)i(e,g[t],!1);for(var r=0;r<m.length;r++)i(e,m[r],!0)};r.invoked=!0;var c=t.createElement("script");c.type="text/javascript",c.integrity="sha384-8fNco6Xiv+HOa+SIVGKVjByyY5LyircydGlHS9mXcHJpapcgF98L6UNOlauMTxJq",c.crossOrigin="anonymous",c.async=!0,c.src="https://cdn.amplitude.com/libs/analytics-browser-2.10.0-min.js.gz",c.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var u=t.getElementsByTagName("script")[0];u.parentNode.insertBefore(c,u);for(var l=function(){return this._q=[],this},p=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],d=0;d<p.length;d++)n(l,p[d]);r.Identify=l;for(var f=function(){return this._q=[],this},y=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],v=0;v<y.length;v++)n(f,y[v]);r.Revenue=f;var g=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],m=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];a(r),r.createInstance=function(e){return r._iq[e]={_q:[]},a(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();
!function(){"use strict";!function(e,t){var r=e.amplitude||{_q:[],_iq:{}};if(r.invoked)e.console&&console.error&&console.error("Amplitude snippet has been loaded.");else{var n=function(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}},s=function(e,t,r){return function(n){e._q.push({name:t,args:Array.prototype.slice.call(r,0),resolve:n})}},o=function(e,t,r){e._q.push({name:t,args:Array.prototype.slice.call(r,0)})},i=function(e,t,r){e[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))};o(e,t,Array.prototype.slice.call(arguments))}},a=function(e){for(var t=0;t<g.length;t++)i(e,g[t],!1);for(var r=0;r<m.length;r++)i(e,m[r],!0)};r.invoked=!0;var c=t.createElement("script");c.type="text/javascript",c.integrity="sha384-pY2pkwHaLM/6UIseFHVU3hOKr6oAvhLcdYkoRZyaMDWLjpM6B7nTxtOdE823WAOQ",c.crossOrigin="anonymous",c.async=!0,c.src="https://cdn.amplitude.com/libs/analytics-browser-2.11.0-min.js.gz",c.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var u=t.getElementsByTagName("script")[0];u.parentNode.insertBefore(c,u);for(var p=function(){return this._q=[],this},l=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],d=0;d<l.length;d++)n(p,l[d]);r.Identify=p;for(var f=function(){return this._q=[],this},v=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],y=0;y<v.length;y++)n(f,v[y]);r.Revenue=f;var g=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset","extendSession"],m=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];a(r),r.createInstance=function(e){return r._iq[e]={_q:[]},a(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();

@@ -59,0 +59,0 @@ amplitude.init("<YOUR_API_KEY>");

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc