Socket
Socket
Sign inDemoInstall

workbox-google-analytics

Package Overview
Dependencies
Maintainers
6
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-google-analytics - npm Package Compare versions

Comparing version 6.5.0 to 6.5.1

2

_version.js
"use strict";
// @ts-ignore
try {
self['workbox:google-analytics:6.4.2'] && _();
self['workbox:google-analytics:6.5.0'] && _();
}
catch (e) { }

@@ -6,3 +6,3 @@ this.workbox = this.workbox || {};

try {
self['workbox:google-analytics:6.4.2'] && _();
self['workbox:google-analytics:6.5.0'] && _();
} catch (e) {}

@@ -9,0 +9,0 @@

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

this.workbox=this.workbox||{},this.workbox.googleAnalytics=function(t,e,o,n,r,c,a,w,s){"use strict";try{self["workbox:google-analytics:6.4.2"]&&_()}catch(t){}const i="www.google-analytics.com",l="www.googletagmanager.com",u=/^\/(\w+\/)?collect/,m=t=>{const e=({url:t})=>t.hostname===i&&u.test(t.pathname),o=new s.NetworkOnly({plugins:[t]});return[new c.Route(e,o,"GET"),new c.Route(e,o,"POST")]},g=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===i&&"/analytics.js"===t.pathname),e,"GET")},h=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===l&&"/gtag/js"===t.pathname),e,"GET")},b=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===l&&"/gtm.js"===t.pathname),e,"GET")};return t.initialize=(t={})=>{const n=o.cacheNames.getGoogleAnalyticsName(t.cacheName),r=new e.BackgroundSyncPlugin("workbox-google-analytics",{maxRetentionTime:2880,onSync:(c=t,async({queue:t})=>{let e;for(;e=await t.shiftRequest();){const{request:o,timestamp:n}=e,r=new URL(o.url);try{const t="POST"===o.method?new URLSearchParams(await o.clone().text()):r.searchParams,e=n-(Number(t.get("qt"))||0),a=Date.now()-e;if(t.set("qt",String(a)),c.parameterOverrides)for(const e of Object.keys(c.parameterOverrides)){const o=c.parameterOverrides[e];t.set(e,o)}"function"==typeof c.hitFilter&&c.hitFilter.call(null,t),await fetch(new Request(r.origin+r.pathname,{body:t.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(o){throw await t.unshiftRequest(e),o}}})});var c;const w=[b(n),g(n),h(n),...m(r)],s=new a.Router;for(const t of w)s.registerRoute(t);s.addFetchListener()},t}({},workbox.backgroundSync,workbox.core._private,workbox.core._private,workbox.core._private,workbox.routing,workbox.routing,workbox.strategies,workbox.strategies);
this.workbox=this.workbox||{},this.workbox.googleAnalytics=function(t,e,o,n,r,c,a,w,s){"use strict";try{self["workbox:google-analytics:6.5.0"]&&_()}catch(t){}const i="www.google-analytics.com",l="www.googletagmanager.com",u=/^\/(\w+\/)?collect/,m=t=>{const e=({url:t})=>t.hostname===i&&u.test(t.pathname),o=new s.NetworkOnly({plugins:[t]});return[new c.Route(e,o,"GET"),new c.Route(e,o,"POST")]},g=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===i&&"/analytics.js"===t.pathname),e,"GET")},h=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===l&&"/gtag/js"===t.pathname),e,"GET")},b=t=>{const e=new w.NetworkFirst({cacheName:t});return new c.Route((({url:t})=>t.hostname===l&&"/gtm.js"===t.pathname),e,"GET")};return t.initialize=(t={})=>{const n=o.cacheNames.getGoogleAnalyticsName(t.cacheName),r=new e.BackgroundSyncPlugin("workbox-google-analytics",{maxRetentionTime:2880,onSync:(c=t,async({queue:t})=>{let e;for(;e=await t.shiftRequest();){const{request:o,timestamp:n}=e,r=new URL(o.url);try{const t="POST"===o.method?new URLSearchParams(await o.clone().text()):r.searchParams,e=n-(Number(t.get("qt"))||0),a=Date.now()-e;if(t.set("qt",String(a)),c.parameterOverrides)for(const e of Object.keys(c.parameterOverrides)){const o=c.parameterOverrides[e];t.set(e,o)}"function"==typeof c.hitFilter&&c.hitFilter.call(null,t),await fetch(new Request(r.origin+r.pathname,{body:t.toString(),method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"text/plain"}}))}catch(o){throw await t.unshiftRequest(e),o}}})});var c;const w=[b(n),g(n),h(n),...m(r)],s=new a.Router;for(const t of w)s.registerRoute(t);s.addFetchListener()},t}({},workbox.backgroundSync,workbox.core._private,workbox.core._private,workbox.core._private,workbox.routing,workbox.routing,workbox.strategies,workbox.strategies);
//# sourceMappingURL=workbox-offline-ga.prod.js.map
{
"name": "workbox-google-analytics",
"version": "6.5.0",
"version": "6.5.1",
"license": "MIT",

@@ -28,8 +28,8 @@ "author": "Google's Web DevRel Team",

"dependencies": {
"workbox-background-sync": "6.5.0",
"workbox-core": "6.5.0",
"workbox-routing": "6.5.0",
"workbox-strategies": "6.5.0"
"workbox-background-sync": "6.5.1",
"workbox-core": "6.5.1",
"workbox-routing": "6.5.1",
"workbox-strategies": "6.5.1"
},
"gitHead": "d796009eadcba556b2795e0fea7d71a241f535e0"
"gitHead": "7c095b4f981976d11a29ac934a16c6a0fbd0c0c1"
}
// @ts-ignore
try{self['workbox:google-analytics:6.5.0']&&_()}catch(e){}
try{self['workbox:google-analytics:6.5.1']&&_()}catch(e){}

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

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