Skip to content

Lomray-Software/google-tag-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Tag Manager service

Supports any popular frontend framework

reliability Security Rating Maintainability Rating Vulnerabilities Bugs Lines of Code code coverage semantic version

Table of contents

Getting started

The package is distributed using npm, the node package manager.

npm i --save @lomray/google-tag-manager

How to use

import GoogleTagManager from '@lomray/google-tag-manager';

const manager = new GoogleTagManager();

useEffect(() => {
  manager.init({ gtmId: GTM_ID });
}, []);


const onButtonClick = () => {
  manager.pushEvent({ my: 'data' });
}

Bugs and feature requests

Bug or a feature request, please open a new issue.

License

Made with 💚

Published under MIT License.