Skip to content

andreyfeelashov/gtagger

Repository files navigation

gtagger

An importable Global Site Tag wrapper for Google website tracking. Allows bundling gtag.js code snippet alongside other modules.

Usage

Install with npm:

npm install gtagger --save

Initialize using a specific tracking ID:

import { Gtagger } from 'gtagger';

Gtagger.initialize(trackingId);

Run commands the same way you would with gtag directly:

Gtagger.run(commandType, ...commandParameters);

Note that calling Gtagger.run without initializing first will likely (and definitely should) fail.

Author

Andrey Feelashov

License

This project is licensed under the MIT License.

About

An importable Global Site Tag wrapper for Google website tracking.

Resources

License

Stars

Watchers

Forks

Packages

No packages published