Method

initialize

static

initialize(options)

Parameter

options

Optional

Object

Values in options have the following properties:

Parameter

cacheName

Optional

Object

The cache name to store and retrieve analytics.js. Defaults to the cache names provided by workbox-core.

parameterOverrides

Optional

Object

Measurement Protocol parameters, expressed as key/value pairs, to be added to replayed Google Analytics requests. This can be used to, e.g., set a custom dimension indicating that the request was replayed.

hitFilter

Optional

function()

A function that allows you to modify the hit parameters prior to replaying the hit. The function is invoked with the original hit's URLSearchParams object as its only argument.