3.0.0 • Published 3 years ago

gtag-opt-in v3.0.0

Weekly downloads
68
License
MIT
Repository
github
Last release
3 years ago

GTag Opt In · Tests Status

Google Analytics Opt In

GTag Opt In is a browser library to opt-in in Google Analytics. Plus, it configures Analytics to anonymize IP. See why and when to use it by reading the wiki page.

Install

NPM

npm install gtag-opt-in

Yarn

yarn install gtag-opt-in

HTML

<script src="https://www.npmcdn.com/gtag-opt-in"></script>

It imports the library as the GTagOptIn global variable.

Use

ES6

import * as GTagOptIn from 'gtag-opt-in';

GTagOptIn.register('UA-XXXXXXXXX-Y');
GTagOptIn.optin();
GTagOptIn.optout();

HTML

<script>
  GTagOptIn.register('UA-XXXXXXXXX-Y');
  GTagOptIn.optin();
  GTagOptIn.optout();
</script>

Documentation

Further documentation can be found at the wiki page.

Future

The library destiny is to be replaced with official support once Google Analytics releases the Consent mode feature which is currently under beta.

License

Software licensed under MIT license. See the LICENSE file.

3.0.0

3 years ago

1.3.0

4 years ago

2.0.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0-alpha.9

4 years ago

1.0.0-alpha.7

4 years ago

1.0.0-alpha.6

4 years ago

1.0.0-alpha.8

4 years ago

1.0.0-alpha.5

4 years ago

1.0.0-alpha.4

4 years ago

1.0.0-alpha.3

4 years ago

1.0.0-alpha.2

4 years ago

1.0.0-alpha.1

4 years ago

1.0.0

4 years ago