The store holds the user's consents to the different
If you want to implement your own persistence of the store (e.g. because you
want to write it in a database instead of the file system) and your own
implementation of the transmission to the Matomo/CIMP backend (e.g. because
you want to tunnel the requests through a proxy or add your own encryption layer),
then create a subclass of this class and and implement the
If you only want to change either one or the other, you can use
(found in the backend example) or
BrowserStore as a base and work from there.
This method gets called from the constructor and will receive the same parameters, as the constructor got.
Arguments your implementation might need for loading the store.
Deserialized store data.
This method gets called, when the SDK is of the opinion, that persisting
Store is in order.
This is partly controlled by the
option, and by calls to
If possible, try to honor the
If it's true, it is set so, because the SDK wants to reduce impact on user
responsivity as much as possible.
If it's false, the SDK wants to make sure, that the call finishes before
the app gets killed.
Indicates, if the persistence should be done asynchronously or synchronously. E.g. a persist call during the exit of an app should be done synchronously, otherwise the operation might never get finished because the OS kills the server too early.
Callback, when the operation is finished, either successfully or not. If no error is returned, the operation is considered successful and the internal counter will be set back again.
This method gets called, when
CleanInsights gathered enough data for a
time period and is ready to send the data to a CIMP (CleanInsights Matomo Proxy).
The serialized JSON for a POST request to a CIMP.
The server URL from `Configuration.server`.
The timeout in seconds from `Configuration.timeout`.
Callback, when the operation is finished, either successfully or not. If no error is returned, the data sent will be removed from the store and the store persisted.
Generated using TypeDoc