@amplitude/analytics-browser 2.13.2 → 2.14.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.
Files changed (35) hide show
  1. package/README.md +1 -1
  2. package/lib/cjs/browser-client.d.ts +7 -2
  3. package/lib/cjs/browser-client.d.ts.map +1 -1
  4. package/lib/cjs/browser-client.js +8 -0
  5. package/lib/cjs/browser-client.js.map +1 -1
  6. package/lib/cjs/config.d.ts +1 -1
  7. package/lib/cjs/version.d.ts +1 -1
  8. package/lib/cjs/version.js +1 -1
  9. package/lib/cjs/version.js.map +1 -1
  10. package/lib/esm/browser-client.d.ts +7 -2
  11. package/lib/esm/browser-client.d.ts.map +1 -1
  12. package/lib/esm/browser-client.js +8 -0
  13. package/lib/esm/browser-client.js.map +1 -1
  14. package/lib/esm/config.d.ts +1 -1
  15. package/lib/esm/version.d.ts +1 -1
  16. package/lib/esm/version.js +1 -1
  17. package/lib/esm/version.js.map +1 -1
  18. package/lib/scripts/amplitude-bookmarklet-snippet-min.js +1 -1
  19. package/lib/scripts/amplitude-bookmarklet.html +1 -1
  20. package/lib/scripts/amplitude-gtm-min.js +1 -1
  21. package/lib/scripts/amplitude-gtm-min.js.gz +0 -0
  22. package/lib/scripts/amplitude-gtm-min.js.map +1 -1
  23. package/lib/scripts/amplitude-gtm-snippet-min.js +1 -1
  24. package/lib/scripts/amplitude-min.js +1 -1
  25. package/lib/scripts/amplitude-min.js.gz +0 -0
  26. package/lib/scripts/amplitude-min.js.map +1 -1
  27. package/lib/scripts/amplitude-min.umd.js +1 -1
  28. package/lib/scripts/amplitude-min.umd.js.gz +0 -0
  29. package/lib/scripts/amplitude-snippet-instructions.html +1 -1
  30. package/lib/scripts/amplitude-snippet-min.js +1 -1
  31. package/lib/scripts/browser-client.d.ts +7 -2
  32. package/lib/scripts/browser-client.d.ts.map +1 -1
  33. package/lib/scripts/config.d.ts +1 -1
  34. package/lib/scripts/version.d.ts +1 -1
  35. package/package.json +5 -5
Binary file
@@ -1,5 +1,5 @@
1
1
  <script type="text/javascript">
2
- !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))}},c=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 a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-dGFNsx6+BiTiyGyJSWdnGsGhw1qYUO28CModNc2V8xeoJb3O9boICWB5gT3hldbN",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-2.13.2-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 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","setReceipt","setReceiptSig","setCurrency","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"];c(r),r.createInstance=function(e){return r._iq[e]={_q:[]},c(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();
2
+ !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))}},c=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 a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-xPs0Q2BT6lkBnbUbnsBlsUp1rc4GnDAsHBtU936JkrJp5+9YFdEArB/T9O7+ey3O",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-2.14.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 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","setReceipt","setReceiptSig","setCurrency","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"];c(r),r.createInstance=function(e){return r._iq[e]={_q:[]},c(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();
3
3
 
4
4
  amplitude.init("<YOUR_API_KEY>");
5
5
  </script>
@@ -1 +1 @@
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))}},c=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 a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-dGFNsx6+BiTiyGyJSWdnGsGhw1qYUO28CModNc2V8xeoJb3O9boICWB5gT3hldbN",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-2.13.2-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 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","setReceipt","setReceiptSig","setCurrency","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"];c(r),r.createInstance=function(e){return r._iq[e]={_q:[]},c(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();
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))}},c=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 a=t.createElement("script");a.type="text/javascript",a.integrity="sha384-xPs0Q2BT6lkBnbUbnsBlsUp1rc4GnDAsHBtU936JkrJp5+9YFdEArB/T9O7+ey3O",a.crossOrigin="anonymous",a.async=!0,a.src="https://cdn.amplitude.com/libs/analytics-browser-2.14.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 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","setReceipt","setReceiptSig","setCurrency","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"];c(r),r.createInstance=function(e){return r._iq[e]={_q:[]},c(r._iq[e]),r._iq[e]},e.amplitude=r}}(window,document)}();
@@ -1,10 +1,14 @@
1
- import { AmplitudeCore, Event, EventOptions, IIdentify, IRevenue, TransportType, Result, BrowserOptions, BrowserConfig, BrowserClient } from '@amplitude/analytics-core';
1
+ import { AmplitudeCore, Event, EventOptions, IIdentify, IRevenue, TransportType, Result, BrowserOptions, BrowserConfig, BrowserClient, Plugin } from '@amplitude/analytics-core';
2
2
  import { WebAttribution } from './attribution/web-attribution';
3
- export declare class AmplitudeBrowser extends AmplitudeCore implements BrowserClient {
3
+ interface PluginHost {
4
+ plugin(name: string): Plugin | undefined;
5
+ }
6
+ export declare class AmplitudeBrowser extends AmplitudeCore implements BrowserClient, PluginHost {
4
7
  config: BrowserConfig;
5
8
  previousSessionDeviceId: string | undefined;
6
9
  previousSessionUserId: string | undefined;
7
10
  webAttribution: WebAttribution | undefined;
11
+ plugin(name: string): Plugin | undefined;
8
12
  init(apiKey?: string, userIdOrOptions?: string | BrowserOptions, maybeOptions?: BrowserOptions): import("@amplitude/analytics-core").AmplitudeReturn<void>;
9
13
  protected _init(options: BrowserOptions & {
10
14
  apiKey: string;
@@ -25,4 +29,5 @@ export declare class AmplitudeBrowser extends AmplitudeCore implements BrowserCl
25
29
  process(event: Event): Promise<Result>;
26
30
  private logBrowserOptions;
27
31
  }
32
+ export {};
28
33
  //# sourceMappingURL=browser-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-client.d.ts","sourceRoot":"","sources":["../../src/browser-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAYb,KAAK,EACL,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,aAAa,EAEb,MAAM,EACN,cAAc,EACd,aAAa,EACb,aAAa,EACd,MAAM,2BAA2B,CAAC;AAuBnC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,qBAAa,gBAAiB,SAAQ,aAAc,YAAW,aAAa;IAG1E,MAAM,EAAE,aAAa,CAAC;IACtB,uBAAuB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC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AQ,aAAc,YAAW,aAAa,EAAE,UAAU;IAGtF,MAAM,EAAE,aAAa,CAAC;IACtB,uBAAuB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5C,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,cAAc,EAAE,cAAc,GAAG,SAAS,CAAC;IAE3C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAUxC,IAAI,CAAC,MAAM,SAAK,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,YAAY,CAAC,EAAE,cAAc;cAkB1E,KAAK,CAAC,OAAO,EAAE,cAAc,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;IAyFlE,SAAS;IAIT,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS;IAYpC,WAAW;IAIX,WAAW,CAAC,QAAQ,EAAE,MAAM;IAU5B,KAAK;IAKL,YAAY;IAIZ,YAAY,CAAC,SAAS,EAAE,MAAM;IAwD9B,aAAa;IAQb,YAAY,CAAC,SAAS,EAAE,aAAa;IAQrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,YAAY;IAezD,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,YAAY;IAS/G,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAE,YAAY;IAStD,OAAO,CAAC,0BAA0B;IAe5B,OAAO,CAAC,KAAK,EAAE,KAAK;IA0B1B,OAAO,CAAC,iBAAiB;CAY1B"}
@@ -30,7 +30,7 @@ export declare class BrowserConfig extends Config implements IBrowserConfig {
30
30
  transport: 'fetch' | 'xhr' | 'beacon';
31
31
  useBatch: boolean;
32
32
  fetchRemoteConfig: boolean;
33
- readonly version = "2.13.2";
33
+ readonly version = "2.14.0";
34
34
  protected _cookieStorage: Storage<UserSession>;
35
35
  protected _deviceId?: string;
36
36
  protected _lastEventId?: number;
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.13.2";
1
+ export declare const VERSION = "2.14.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amplitude/analytics-browser",
3
- "version": "2.13.2",
3
+ "version": "2.14.0",
4
4
  "description": "Official Amplitude SDK for Web",
5
5
  "keywords": [
6
6
  "analytics",
@@ -45,10 +45,10 @@
45
45
  "url": "https://github.com/amplitude/Amplitude-TypeScript/issues"
46
46
  },
47
47
  "dependencies": {
48
- "@amplitude/analytics-core": "^2.8.0",
48
+ "@amplitude/analytics-core": "^2.9.0",
49
49
  "@amplitude/analytics-remote-config": "^0.4.0",
50
- "@amplitude/plugin-autocapture-browser": "^1.1.5",
51
- "@amplitude/plugin-page-view-tracking-browser": "^2.3.15",
50
+ "@amplitude/plugin-autocapture-browser": "^1.1.7",
51
+ "@amplitude/plugin-page-view-tracking-browser": "^2.3.17",
52
52
  "tslib": "^2.4.1"
53
53
  },
54
54
  "devDependencies": {
@@ -67,5 +67,5 @@
67
67
  "files": [
68
68
  "lib"
69
69
  ],
70
- "gitHead": "ffff4c9253324bf2896916659e714ca26f2c941f"
70
+ "gitHead": "bed8f4e611b944dab30a9aea4e48022655b0ddb0"
71
71
  }