Skip to content
This repository was archived by the owner on Dec 13, 2020. It is now read-only.

pirxpilot/ga

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ga

Google Analytics tracking snippet You might want to use pirxpilot/google-ua instead - it supports new Google Universal Analytics snippet.

Installation

$ npm install @pirxpilot/ga

API

Activate Google Analytics on the page and track page

require('ga')("UA-XXXX-X");

Alternatively you can define GA property ID as a data attribute of document body

<body data-ga-property-id="UA-XXXX-X">

Check test/index.html for example.

License

MIT

About

Google Analytics tracking snippet

Resources

License

Stars

Watchers

Forks

Packages

No packages published