@amplitude/analytics-browser
Advanced tools
Comparing version 1.5.1 to 1.5.2
import { AmplitudeCore } from '@amplitude/analytics-core'; | ||
import { AttributionOptions, BrowserClient, BrowserConfig, BrowserOptions, EventOptions, Identify as IIdentify, Result, Revenue as IRevenue, TransportType } from '@amplitude/analytics-types'; | ||
export declare class AmplitudeBrowser extends AmplitudeCore<BrowserConfig> { | ||
init(apiKey: string, userId?: string, options?: BrowserOptions): Promise<void>; | ||
init(apiKey?: string, userId?: string, options?: BrowserOptions): Promise<void>; | ||
runAttributionStrategy(attributionConfig?: AttributionOptions, isNewSession?: boolean): Promise<void>; | ||
@@ -6,0 +6,0 @@ getUserId(): string | undefined; |
@@ -17,2 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
var _a, _b, _c; | ||
if (apiKey === void 0) { apiKey = ''; } | ||
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () { | ||
@@ -19,0 +20,0 @@ var oldCookies, browserOptions, isNewSession, connector; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.5.1"; | ||
export declare const VERSION = "1.5.2"; | ||
//# sourceMappingURL=version.d.ts.map |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = void 0; | ||
exports.VERSION = '1.5.1'; | ||
exports.VERSION = '1.5.2'; | ||
//# sourceMappingURL=version.js.map |
import { AmplitudeCore } from '@amplitude/analytics-core'; | ||
import { AttributionOptions, BrowserClient, BrowserConfig, BrowserOptions, EventOptions, Identify as IIdentify, Result, Revenue as IRevenue, TransportType } from '@amplitude/analytics-types'; | ||
export declare class AmplitudeBrowser extends AmplitudeCore<BrowserConfig> { | ||
init(apiKey: string, userId?: string, options?: BrowserOptions): Promise<void>; | ||
init(apiKey?: string, userId?: string, options?: BrowserOptions): Promise<void>; | ||
runAttributionStrategy(attributionConfig?: AttributionOptions, isNewSession?: boolean): Promise<void>; | ||
@@ -6,0 +6,0 @@ getUserId(): string | undefined; |
@@ -15,2 +15,3 @@ import { __assign, __awaiter, __extends, __generator } from "tslib"; | ||
var _a, _b, _c; | ||
if (apiKey === void 0) { apiKey = ''; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -17,0 +18,0 @@ var oldCookies, browserOptions, isNewSession, connector; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.5.1"; | ||
export declare const VERSION = "1.5.2"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export var VERSION = '1.5.1'; | ||
export var VERSION = '1.5.2'; | ||
//# 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{r.invoked=!0;var n=t.createElement("script");n.type="text/javascript",n.integrity="sha384-KhsNZzlMl/yE+u/MowsLKm9jvghmBxiXW8aKvciqaaMaeHrm5uGeQluaVkpD9C7I",n.crossOrigin="anonymous",n.async=!0,n.src="https://cdn.amplitude.com/libs/analytics-browser-1.5.1-min.js.gz",n.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var s=t.getElementsByTagName("script")[0];function v(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}}s.parentNode.insertBefore(n,s);for(var o=function(){return this._q=[],this},i=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],a=0;a<i.length;a++)v(o,i[a]);r.Identify=o;for(var u=function(){return this._q=[],this},c=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],l=0;l<c.length;l++)v(u,c[l]);r.Revenue=u;var p=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset"],d=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];function f(e){function t(t,r){e[t]=function(){var n={promise:new Promise((r=>{e._q.push({name:t,args:Array.prototype.slice.call(arguments,0),resolve:r})}))};if(r)return n}}for(var r=0;r<p.length;r++)t(p[r],!1);for(var n=0;n<d.length;n++)t(d[n],!0)}f(r),r.createInstance=function(){var e=r._iq.push({_q:[]})-1;return f(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{r.invoked=!0;var n=t.createElement("script");n.type="text/javascript",n.integrity="sha384-y1DhkWqRViQfaFLgZVsgpr2glMqpyYP0cLrmjUeGwvu16x1xT/b5hUyrZKluUMnV",n.crossOrigin="anonymous",n.async=!0,n.src="https://cdn.amplitude.com/libs/analytics-browser-1.5.2-min.js.gz",n.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var s=t.getElementsByTagName("script")[0];function v(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}}s.parentNode.insertBefore(n,s);for(var o=function(){return this._q=[],this},i=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],a=0;a<i.length;a++)v(o,i[a]);r.Identify=o;for(var u=function(){return this._q=[],this},c=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],p=0;p<c.length;p++)v(u,c[p]);r.Revenue=u;var l=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset"],d=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];function f(e){function t(t,r){e[t]=function(){var n={promise:new Promise((r=>{e._q.push({name:t,args:Array.prototype.slice.call(arguments,0),resolve:r})}))};if(r)return n}}for(var r=0;r<l.length;r++)t(l[r],!1);for(var n=0;n<d.length;n++)t(d[n],!0)}f(r),r.createInstance=function(){var e=r._iq.push({_q:[]})-1;return f(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}(); |
{ | ||
"name": "@amplitude/analytics-browser", | ||
"version": "1.5.1", | ||
"version": "1.5.2", | ||
"description": "Official Amplitude SDK for Web", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"", | ||
"playground": "cp lib/scripts/amplitude-min.js playground/amplitude.js && cd playground && npx http-server && cd -", | ||
"playground": "cp lib/scripts/amplitude-min.js playground/amplitude.js && http-server ./playground", | ||
"publish": "node scripts/publish/upload-to-s3.js", | ||
@@ -47,3 +47,3 @@ "test": "jest", | ||
"dependencies": { | ||
"@amplitude/analytics-client-common": "^0.2.2", | ||
"@amplitude/analytics-client-common": "^0.2.3", | ||
"@amplitude/analytics-core": "^0.9.4", | ||
@@ -60,2 +60,3 @@ "@amplitude/analytics-types": "^0.10.3", | ||
"@types/ua-parser-js": "^0.7.36", | ||
"http-server": "^14.1.1", | ||
"isomorphic-fetch": "^3.0.0", | ||
@@ -70,3 +71,3 @@ "rollup": "^2.69.0", | ||
], | ||
"gitHead": "66ea9159b61cc2f234b2978116025e5b55af21d2" | ||
"gitHead": "29ab81e0ee1d42c4e5729f920683b47289f4b5fb" | ||
} |
@@ -35,3 +35,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{r.invoked=!0;var n=t.createElement("script");n.type="text/javascript",n.integrity="sha384-KhsNZzlMl/yE+u/MowsLKm9jvghmBxiXW8aKvciqaaMaeHrm5uGeQluaVkpD9C7I",n.crossOrigin="anonymous",n.async=!0,n.src="https://cdn.amplitude.com/libs/analytics-browser-1.5.1-min.js.gz",n.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var s=t.getElementsByTagName("script")[0];function v(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}}s.parentNode.insertBefore(n,s);for(var o=function(){return this._q=[],this},i=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],a=0;a<i.length;a++)v(o,i[a]);r.Identify=o;for(var u=function(){return this._q=[],this},c=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],l=0;l<c.length;l++)v(u,c[l]);r.Revenue=u;var p=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset"],d=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];function f(e){function t(t,r){e[t]=function(){var n={promise:new Promise((r=>{e._q.push({name:t,args:Array.prototype.slice.call(arguments,0),resolve:r})}))};if(r)return n}}for(var r=0;r<p.length;r++)t(p[r],!1);for(var n=0;n<d.length;n++)t(d[n],!0)}f(r),r.createInstance=function(){var e=r._iq.push({_q:[]})-1;return f(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{r.invoked=!0;var n=t.createElement("script");n.type="text/javascript",n.integrity="sha384-y1DhkWqRViQfaFLgZVsgpr2glMqpyYP0cLrmjUeGwvu16x1xT/b5hUyrZKluUMnV",n.crossOrigin="anonymous",n.async=!0,n.src="https://cdn.amplitude.com/libs/analytics-browser-1.5.2-min.js.gz",n.onload=function(){e.amplitude.runQueuedFunctions||console.log("[Amplitude] Error: could not load SDK")};var s=t.getElementsByTagName("script")[0];function v(e,t){e.prototype[t]=function(){return this._q.push({name:t,args:Array.prototype.slice.call(arguments,0)}),this}}s.parentNode.insertBefore(n,s);for(var o=function(){return this._q=[],this},i=["add","append","clearAll","prepend","set","setOnce","unset","preInsert","postInsert","remove","getUserProperties"],a=0;a<i.length;a++)v(o,i[a]);r.Identify=o;for(var u=function(){return this._q=[],this},c=["getEventProperties","setProductId","setQuantity","setPrice","setRevenue","setRevenueType","setEventProperties"],p=0;p<c.length;p++)v(u,c[p]);r.Revenue=u;var l=["getDeviceId","setDeviceId","getSessionId","setSessionId","getUserId","setUserId","setOptOut","setTransport","reset"],d=["init","add","remove","track","logEvent","identify","groupIdentify","setGroup","revenue","flush"];function f(e){function t(t,r){e[t]=function(){var n={promise:new Promise((r=>{e._q.push({name:t,args:Array.prototype.slice.call(arguments,0),resolve:r})}))};if(r)return n}}for(var r=0;r<l.length;r++)t(l[r],!1);for(var n=0;n<d.length;n++)t(d[n],!0)}f(r),r.createInstance=function(){var e=r._iq.push({_q:[]})-1;return f(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}(); | ||
@@ -38,0 +38,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 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
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances 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
419897
2669
11
6