@amplitude/analytics-browser
Advanced tools
Comparing version 1.9.4 to 1.10.0
@@ -29,3 +29,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var _v, _w, _x, legacyCookies, cookieStorage, previousCookies, queryParams, deviceId, sessionId, optOut, lastEventTime, userId, browserOptions, isNewSession, connector, webAttribution, pageViewTrackingOptions; | ||
var _v, _w, _x, legacyCookies, cookieStorage, previousCookies, queryParams, deviceId, sessionId, optOut, lastEventId, lastEventTime, userId, browserOptions, isNewSession, connector, webAttribution, pageViewTrackingOptions; | ||
var _this = this; | ||
@@ -72,2 +72,3 @@ return tslib_1.__generator(this, function (_y) { | ||
optOut = (_h = (_g = options.optOut) !== null && _g !== void 0 ? _g : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.optOut) !== null && _h !== void 0 ? _h : legacyCookies.optOut; | ||
lastEventId = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.lastEventId; | ||
lastEventTime = (_j = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.lastEventTime) !== null && _j !== void 0 ? _j : legacyCookies.lastEventTime; | ||
@@ -77,3 +78,3 @@ userId = (_l = (_k = options.userId) !== null && _k !== void 0 ? _k : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.userId) !== null && _l !== void 0 ? _l : legacyCookies.userId; | ||
this.previousSessionUserId = (_o = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.userId) !== null && _o !== void 0 ? _o : legacyCookies.userId; | ||
return [4 /*yield*/, (0, config_1.useBrowserConfig)(options.apiKey, tslib_1.__assign(tslib_1.__assign({}, options), { deviceId: deviceId, sessionId: sessionId, optOut: optOut, lastEventTime: lastEventTime, userId: userId, cookieStorage: cookieStorage }))]; | ||
return [4 /*yield*/, (0, config_1.useBrowserConfig)(options.apiKey, tslib_1.__assign(tslib_1.__assign({}, options), { deviceId: deviceId, sessionId: sessionId, optOut: optOut, lastEventId: lastEventId, lastEventTime: lastEventTime, userId: userId, cookieStorage: cookieStorage }))]; | ||
case 9: | ||
@@ -80,0 +81,0 @@ browserOptions = _y.sent(); |
@@ -33,2 +33,3 @@ import { AttributionOptions, Event, BrowserOptions, BrowserConfig as IBrowserConfig, DefaultTrackingOptions, Storage, TrackingOptions, TransportType, UserSession } from '@amplitude/analytics-types'; | ||
protected _deviceId?: string; | ||
protected _lastEventId?: number; | ||
protected _lastEventTime?: number; | ||
@@ -49,2 +50,4 @@ protected _optOut: boolean; | ||
set lastEventTime(lastEventTime: number | undefined); | ||
get lastEventId(): number | undefined; | ||
set lastEventId(lastEventId: number | undefined); | ||
private updateStorage; | ||
@@ -51,0 +54,0 @@ } |
@@ -48,2 +48,3 @@ var _this = this; | ||
_this.deviceId = options === null || options === void 0 ? void 0 : options.deviceId; | ||
_this.lastEventId = options === null || options === void 0 ? void 0 : options.lastEventId; | ||
_this.lastEventTime = options === null || options === void 0 ? void 0 : options.lastEventTime; | ||
@@ -133,2 +134,15 @@ _this.optOut = Boolean(options === null || options === void 0 ? void 0 : options.optOut); | ||
}); | ||
Object.defineProperty(BrowserConfig.prototype, "lastEventId", { | ||
get: function () { | ||
return this._lastEventId; | ||
}, | ||
set: function (lastEventId) { | ||
if (this._lastEventId !== lastEventId) { | ||
this._lastEventId = lastEventId; | ||
this.updateStorage(); | ||
} | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
BrowserConfig.prototype.updateStorage = function () { | ||
@@ -142,2 +156,3 @@ var _a; | ||
lastEventTime: this._lastEventTime, | ||
lastEventId: this._lastEventId, | ||
}; | ||
@@ -150,3 +165,3 @@ void ((_a = this.cookieStorage) === null || _a === void 0 ? void 0 : _a.set((0, analytics_client_common_1.getCookieName)(this.apiKey), cache)); | ||
var useBrowserConfig = function (apiKey, options) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var defaultConfig, deviceId, lastEventTime, optOut, sessionId, userId, cookieStorage, domain, _a, _b, _c; | ||
var defaultConfig, deviceId, lastEventId, lastEventTime, optOut, sessionId, userId, cookieStorage, domain, _a, _b, _c; | ||
var _d; | ||
@@ -159,2 +174,3 @@ var _e, _f; | ||
deviceId = (_e = options === null || options === void 0 ? void 0 : options.deviceId) !== null && _e !== void 0 ? _e : (0, analytics_core_1.UUID)(); | ||
lastEventId = options === null || options === void 0 ? void 0 : options.lastEventId; | ||
lastEventTime = options === null || options === void 0 ? void 0 : options.lastEventTime; | ||
@@ -169,3 +185,3 @@ optOut = options === null || options === void 0 ? void 0 : options.optOut; | ||
_c = [tslib_1.__assign({}, options)]; | ||
_d = { cookieStorage: cookieStorage, deviceId: deviceId, domain: domain, lastEventTime: lastEventTime, optOut: optOut, sessionId: sessionId }; | ||
_d = { cookieStorage: cookieStorage, deviceId: deviceId, domain: domain, lastEventId: lastEventId, lastEventTime: lastEventTime, optOut: optOut, sessionId: sessionId }; | ||
return [4 /*yield*/, (0, exports.createEventsStorage)(options)]; | ||
@@ -172,0 +188,0 @@ case 1: return [2 /*return*/, new (_a.apply(BrowserConfig, _b.concat([tslib_1.__assign.apply(void 0, _c.concat([(_d.storageProvider = _g.sent(), _d.trackingOptions = tslib_1.__assign(tslib_1.__assign({}, defaultConfig.trackingOptions), options === null || options === void 0 ? void 0 : options.trackingOptions), _d.transportProvider = (_f = options === null || options === void 0 ? void 0 : options.transportProvider) !== null && _f !== void 0 ? _f : (0, exports.createTransport)(options === null || options === void 0 ? void 0 : options.transport), _d.userId = userId, _d)]))])))()]; |
@@ -8,2 +8,3 @@ import { BeforePlugin, BrowserConfig, Event, PluginType } from '@amplitude/analytics-types'; | ||
eventId: number; | ||
userAgent: string | undefined; | ||
uaResult: UAParser.IResult; | ||
@@ -10,0 +11,0 @@ library: string; |
@@ -17,11 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
this.library = "amplitude-ts/".concat(version_1.VERSION); | ||
var agent; | ||
/* istanbul ignore else */ | ||
if (typeof navigator !== 'undefined') { | ||
agent = navigator.userAgent; | ||
this.userAgent = navigator.userAgent; | ||
} | ||
this.uaResult = new ua_parser_js_1.default(agent).getResult(); | ||
this.uaResult = new ua_parser_js_1.default(this.userAgent).getResult(); | ||
} | ||
Context.prototype.setup = function (config) { | ||
this.config = config; | ||
this.eventId = this.config.lastEventId ? this.config.lastEventId + 1 : 0; | ||
return Promise.resolve(undefined); | ||
@@ -38,2 +38,3 @@ }; | ||
deviceVendor = this.uaResult.device.vendor; | ||
this.config.lastEventId = this.eventId; | ||
event = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ user_id: this.config.userId, device_id: this.config.deviceId, session_id: this.config.sessionId, time: time }, (this.config.appVersion && { app_version: this.config.appVersion })), (this.config.trackingOptions.platform && { platform: BROWSER_PLATFORM })), (this.config.trackingOptions.osName && { os_name: osName })), (this.config.trackingOptions.osVersion && { os_version: osVersion })), (this.config.trackingOptions.deviceManufacturer && { device_manufacturer: deviceVendor })), (this.config.trackingOptions.deviceModel && { device_model: deviceModel })), (this.config.trackingOptions.language && { language: (0, analytics_client_common_1.getLanguage)() })), (this.config.trackingOptions.ipAddress && { ip: IP_ADDRESS })), { insert_id: (0, analytics_core_1.UUID)(), partner_id: this.config.partnerId, plan: this.config.plan }), (this.config.ingestionMetadata && { | ||
@@ -44,3 +45,3 @@ ingestion_metadata: { | ||
}, | ||
})), context), { event_id: this.eventId++, library: this.library }); | ||
})), context), { event_id: this.eventId++, library: this.library, user_agent: this.userAgent }); | ||
return [2 /*return*/, event]; | ||
@@ -47,0 +48,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.9.4"; | ||
export declare const VERSION = "1.10.0"; | ||
//# sourceMappingURL=version.d.ts.map |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = void 0; | ||
exports.VERSION = '1.9.4'; | ||
exports.VERSION = '1.10.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -27,3 +27,3 @@ import { __assign, __awaiter, __extends, __generator } from "tslib"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var _v, _w, _x, legacyCookies, cookieStorage, previousCookies, queryParams, deviceId, sessionId, optOut, lastEventTime, userId, browserOptions, isNewSession, connector, webAttribution, pageViewTrackingOptions; | ||
var _v, _w, _x, legacyCookies, cookieStorage, previousCookies, queryParams, deviceId, sessionId, optOut, lastEventId, lastEventTime, userId, browserOptions, isNewSession, connector, webAttribution, pageViewTrackingOptions; | ||
var _this = this; | ||
@@ -70,2 +70,3 @@ return __generator(this, function (_y) { | ||
optOut = (_h = (_g = options.optOut) !== null && _g !== void 0 ? _g : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.optOut) !== null && _h !== void 0 ? _h : legacyCookies.optOut; | ||
lastEventId = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.lastEventId; | ||
lastEventTime = (_j = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.lastEventTime) !== null && _j !== void 0 ? _j : legacyCookies.lastEventTime; | ||
@@ -75,3 +76,3 @@ userId = (_l = (_k = options.userId) !== null && _k !== void 0 ? _k : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.userId) !== null && _l !== void 0 ? _l : legacyCookies.userId; | ||
this.previousSessionUserId = (_o = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.userId) !== null && _o !== void 0 ? _o : legacyCookies.userId; | ||
return [4 /*yield*/, useBrowserConfig(options.apiKey, __assign(__assign({}, options), { deviceId: deviceId, sessionId: sessionId, optOut: optOut, lastEventTime: lastEventTime, userId: userId, cookieStorage: cookieStorage }))]; | ||
return [4 /*yield*/, useBrowserConfig(options.apiKey, __assign(__assign({}, options), { deviceId: deviceId, sessionId: sessionId, optOut: optOut, lastEventId: lastEventId, lastEventTime: lastEventTime, userId: userId, cookieStorage: cookieStorage }))]; | ||
case 9: | ||
@@ -78,0 +79,0 @@ browserOptions = _y.sent(); |
@@ -33,2 +33,3 @@ import { AttributionOptions, Event, BrowserOptions, BrowserConfig as IBrowserConfig, DefaultTrackingOptions, Storage, TrackingOptions, TransportType, UserSession } from '@amplitude/analytics-types'; | ||
protected _deviceId?: string; | ||
protected _lastEventId?: number; | ||
protected _lastEventTime?: number; | ||
@@ -49,2 +50,4 @@ protected _optOut: boolean; | ||
set lastEventTime(lastEventTime: number | undefined); | ||
get lastEventId(): number | undefined; | ||
set lastEventId(lastEventId: number | undefined); | ||
private updateStorage; | ||
@@ -51,0 +54,0 @@ } |
@@ -44,2 +44,3 @@ import { __assign, __awaiter, __extends, __generator, __values } from "tslib"; | ||
_this.deviceId = options === null || options === void 0 ? void 0 : options.deviceId; | ||
_this.lastEventId = options === null || options === void 0 ? void 0 : options.lastEventId; | ||
_this.lastEventTime = options === null || options === void 0 ? void 0 : options.lastEventTime; | ||
@@ -129,2 +130,15 @@ _this.optOut = Boolean(options === null || options === void 0 ? void 0 : options.optOut); | ||
}); | ||
Object.defineProperty(BrowserConfig.prototype, "lastEventId", { | ||
get: function () { | ||
return this._lastEventId; | ||
}, | ||
set: function (lastEventId) { | ||
if (this._lastEventId !== lastEventId) { | ||
this._lastEventId = lastEventId; | ||
this.updateStorage(); | ||
} | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
BrowserConfig.prototype.updateStorage = function () { | ||
@@ -138,2 +152,3 @@ var _a; | ||
lastEventTime: this._lastEventTime, | ||
lastEventId: this._lastEventId, | ||
}; | ||
@@ -146,3 +161,3 @@ void ((_a = this.cookieStorage) === null || _a === void 0 ? void 0 : _a.set(getCookieName(this.apiKey), cache)); | ||
export var useBrowserConfig = function (apiKey, options) { return __awaiter(void 0, void 0, void 0, function () { | ||
var defaultConfig, deviceId, lastEventTime, optOut, sessionId, userId, cookieStorage, domain, _a, _b, _c; | ||
var defaultConfig, deviceId, lastEventId, lastEventTime, optOut, sessionId, userId, cookieStorage, domain, _a, _b, _c; | ||
var _d; | ||
@@ -155,2 +170,3 @@ var _e, _f; | ||
deviceId = (_e = options === null || options === void 0 ? void 0 : options.deviceId) !== null && _e !== void 0 ? _e : UUID(); | ||
lastEventId = options === null || options === void 0 ? void 0 : options.lastEventId; | ||
lastEventTime = options === null || options === void 0 ? void 0 : options.lastEventTime; | ||
@@ -165,3 +181,3 @@ optOut = options === null || options === void 0 ? void 0 : options.optOut; | ||
_c = [__assign({}, options)]; | ||
_d = { cookieStorage: cookieStorage, deviceId: deviceId, domain: domain, lastEventTime: lastEventTime, optOut: optOut, sessionId: sessionId }; | ||
_d = { cookieStorage: cookieStorage, deviceId: deviceId, domain: domain, lastEventId: lastEventId, lastEventTime: lastEventTime, optOut: optOut, sessionId: sessionId }; | ||
return [4 /*yield*/, createEventsStorage(options)]; | ||
@@ -168,0 +184,0 @@ case 1: return [2 /*return*/, new (_a.apply(BrowserConfig, _b.concat([__assign.apply(void 0, _c.concat([(_d.storageProvider = _g.sent(), _d.trackingOptions = __assign(__assign({}, defaultConfig.trackingOptions), options === null || options === void 0 ? void 0 : options.trackingOptions), _d.transportProvider = (_f = options === null || options === void 0 ? void 0 : options.transportProvider) !== null && _f !== void 0 ? _f : createTransport(options === null || options === void 0 ? void 0 : options.transport), _d.userId = userId, _d)]))])))()]; |
@@ -8,2 +8,3 @@ import { BeforePlugin, BrowserConfig, Event, PluginType } from '@amplitude/analytics-types'; | ||
eventId: number; | ||
userAgent: string | undefined; | ||
uaResult: UAParser.IResult; | ||
@@ -10,0 +11,0 @@ library: string; |
@@ -15,11 +15,11 @@ import { __assign, __awaiter, __generator } from "tslib"; | ||
this.library = "amplitude-ts/".concat(VERSION); | ||
var agent; | ||
/* istanbul ignore else */ | ||
if (typeof navigator !== 'undefined') { | ||
agent = navigator.userAgent; | ||
this.userAgent = navigator.userAgent; | ||
} | ||
this.uaResult = new UAParser(agent).getResult(); | ||
this.uaResult = new UAParser(this.userAgent).getResult(); | ||
} | ||
Context.prototype.setup = function (config) { | ||
this.config = config; | ||
this.eventId = this.config.lastEventId ? this.config.lastEventId + 1 : 0; | ||
return Promise.resolve(undefined); | ||
@@ -36,2 +36,3 @@ }; | ||
deviceVendor = this.uaResult.device.vendor; | ||
this.config.lastEventId = this.eventId; | ||
event = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ user_id: this.config.userId, device_id: this.config.deviceId, session_id: this.config.sessionId, time: time }, (this.config.appVersion && { app_version: this.config.appVersion })), (this.config.trackingOptions.platform && { platform: BROWSER_PLATFORM })), (this.config.trackingOptions.osName && { os_name: osName })), (this.config.trackingOptions.osVersion && { os_version: osVersion })), (this.config.trackingOptions.deviceManufacturer && { device_manufacturer: deviceVendor })), (this.config.trackingOptions.deviceModel && { device_model: deviceModel })), (this.config.trackingOptions.language && { language: getLanguage() })), (this.config.trackingOptions.ipAddress && { ip: IP_ADDRESS })), { insert_id: UUID(), partner_id: this.config.partnerId, plan: this.config.plan }), (this.config.ingestionMetadata && { | ||
@@ -42,3 +43,3 @@ ingestion_metadata: { | ||
}, | ||
})), context), { event_id: this.eventId++, library: this.library }); | ||
})), context), { event_id: this.eventId++, library: this.library, user_agent: this.userAgent }); | ||
return [2 /*return*/, event]; | ||
@@ -45,0 +46,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.9.4"; | ||
export declare const VERSION = "1.10.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export var VERSION = '1.9.4'; | ||
export var VERSION = '1.10.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}},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[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))}}},i=function(e){for(var t=0;t<g.length;t++)o(e,g[t],!1);for(var r=0;r<m.length;r++)o(e,m[r],!0)};r.invoked=!0;var a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-K9gmPAHHNQILXzzesVo3pGFcA3173YpsgdGS9pwEtScsShX30Eqj5WETWjaZb+wg",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-1.9.4-min.js.gz",a.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var c=t.getElementsByTagName("script")[0];c.parentNode.insertBefore(a,c);for(var u=function(){return this._q=[],this},p=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],l=0;l<p.length;l++)n(u,p[l]);r.Identify=u;for(var d=function(){return this._q=[],this},f=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],v=0;v<f.length;v++)n(d,f[v]);r.Revenue=d;var g=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset"],m=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];i(r),r.createInstance=function(e){return r._iq[e]={_q:[]},i(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[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))}}},i=function(e){for(var t=0;t<m.length;t++)o(e,m[t],!1);for(var r=0;r<g.length;r++)o(e,g[r],!0)};r.invoked=!0;var a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-Yx7Q0NLmdQhVBzW8q+6owmGCxBEMdOLjGuqhLYPLLNgdC03Jr/HSoYeU6AIUmfOn",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-1.10.0-min.js.gz",a.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var u=t.getElementsByTagName("script")[0];u.parentNode.insertBefore(a,u);for(var c=function(){return this._q=[],this},l=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],p=0;p<l.length;p++)n(c,l[p]);r.Identify=c;for(var d=function(){return this._q=[],this},f=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],v=0;v<f.length;v++)n(d,f[v]);r.Revenue=d;var m=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset"],g=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];i(r),r.createInstance=function(e){return r._iq[e]={_q:[]},i(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}(); |
@@ -33,2 +33,3 @@ import { AttributionOptions, Event, BrowserOptions, BrowserConfig as IBrowserConfig, DefaultTrackingOptions, Storage, TrackingOptions, TransportType, UserSession } from '@amplitude/analytics-types'; | ||
protected _deviceId?: string; | ||
protected _lastEventId?: number; | ||
protected _lastEventTime?: number; | ||
@@ -49,2 +50,4 @@ protected _optOut: boolean; | ||
set lastEventTime(lastEventTime: number | undefined); | ||
get lastEventId(): number | undefined; | ||
set lastEventId(lastEventId: number | undefined); | ||
private updateStorage; | ||
@@ -51,0 +54,0 @@ } |
@@ -8,2 +8,3 @@ import { BeforePlugin, BrowserConfig, Event, PluginType } from '@amplitude/analytics-types'; | ||
eventId: number; | ||
userAgent: string | undefined; | ||
uaResult: UAParser.IResult; | ||
@@ -10,0 +11,0 @@ library: string; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.9.4"; | ||
export declare const VERSION = "1.10.0"; | ||
//# sourceMappingURL=version.d.ts.map |
{ | ||
"name": "@amplitude/analytics-browser", | ||
"version": "1.9.4", | ||
"version": "1.10.0", | ||
"description": "Official Amplitude SDK for Web", | ||
@@ -46,7 +46,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@amplitude/analytics-client-common": "^0.6.3", | ||
"@amplitude/analytics-core": "^0.13.0", | ||
"@amplitude/analytics-types": "^0.18.0", | ||
"@amplitude/plugin-page-view-tracking-browser": "^0.7.0", | ||
"@amplitude/plugin-web-attribution-browser": "^0.6.4", | ||
"@amplitude/analytics-client-common": "^0.6.4", | ||
"@amplitude/analytics-core": "^0.13.1", | ||
"@amplitude/analytics-types": "^0.19.0", | ||
"@amplitude/plugin-page-view-tracking-browser": "^0.7.1", | ||
"@amplitude/plugin-web-attribution-browser": "^0.6.5", | ||
"@amplitude/ua-parser-js": "^0.7.31", | ||
@@ -71,3 +71,3 @@ "tslib": "^2.4.1" | ||
], | ||
"gitHead": "5873e5d604445490dd9fcbfe80dc3cbb19a17c2d" | ||
"gitHead": "92a855a7f7ea3a937524a329766be8288a48c52e" | ||
} |
@@ -43,3 +43,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[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))}}},i=function(e){for(var t=0;t<g.length;t++)o(e,g[t],!1);for(var r=0;r<m.length;r++)o(e,m[r],!0)};r.invoked=!0;var a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-K9gmPAHHNQILXzzesVo3pGFcA3173YpsgdGS9pwEtScsShX30Eqj5WETWjaZb+wg",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-1.9.4-min.js.gz",a.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var c=t.getElementsByTagName("script")[0];c.parentNode.insertBefore(a,c);for(var u=function(){return this._q=[],this},p=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],l=0;l<p.length;l++)n(u,p[l]);r.Identify=u;for(var d=function(){return this._q=[],this},f=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],v=0;v<f.length;v++)n(d,f[v]);r.Revenue=d;var g=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset"],m=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];i(r),r.createInstance=function(e){return r._iq[e]={_q:[]},i(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[t]=function(){if(r)return{promise:new Promise(s(e,t,Array.prototype.slice.call(arguments)))}}},i=function(e){for(var t=0;t<m.length;t++)o(e,m[t],!1);for(var r=0;r<g.length;r++)o(e,g[r],!0)};r.invoked=!0;var a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-Yx7Q0NLmdQhVBzW8q+6owmGCxBEMdOLjGuqhLYPLLNgdC03Jr/HSoYeU6AIUmfOn",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-1.10.0-min.js.gz",a.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var u=t.getElementsByTagName("script")[0];u.parentNode.insertBefore(a,u);for(var c=function(){return this._q=[],this},l=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],p=0;p<l.length;p++)n(c,l[p]);r.Identify=c;for(var d=function(){return this._q=[],this},f=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],v=0;v<f.length;v++)n(d,f[v]);r.Revenue=d;var m=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset"],g=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];i(r),r.createInstance=function(e){return r._iq[e]={_q:[]},i(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}(); | ||
@@ -46,0 +46,0 @@ amplitude.init("YOUR_API_KEY_HERE"); |
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 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 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 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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
593762
3796