Add possibility to disable analytics packages until user don't accept cookies


I wish to be able to fully disable analytics packages until a User enables them, so they don’t create Cookies before consent.


As much as I know, we can not use Cookies in EU, until users don’t accept a Cookie Consent.
Even I set and to false, @frontity/google-analytics will initialize the script, which will create cookies instantly.

Possible solutions


  1. Create a global option in the analytics package for cookie consent.

  2. OR if both and are false, disable the analytics package.

Way to solve it:

  1. Don’t include analytics packeges until user does not accept cookie consent
  2. Or disable analytics packages one-by-one. E.g.: GA can be disabled like this: window['ga-disable-UA-XXXXXX-Y'] = true;