8000 GitHub - kate-orlova/gtm-tracking: GTM tracking
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kate-orlova/gtm-tracking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub license GitHub language count GitHub top language GitHub repo size GitHub contributors

GTM Tracking

GTM Tracking is an open source library supporting an integration with Google Tag Manager (GTM) using a Data Layer in order to capture and report on the users' activity on a website.

Key classes implementing the core functionality are

  1. GTM class extends the standard window.dataLayer.push() method;
  2. BaseElement class defines a basic element with the commin properties and methods;
  3. CtaEventTracker class implements an event handler for tracking by data attributes.

Once you have integrated this library into your solution, you can simply specify the required data attributes to the elemnets you want to track. For example, for a button element you can specify the data attributes as follows:

<button track-category="Your tracking category" track-label="Your tracking label" />

Contribution

Hope you found this library helpful, your contributions and suggestions will be very much appreciated. Please submit a pull request.

License

The GTM Tracking library is released under the MIT license what means that you can modify and use it how you want even for commercial use. Please give it a star if you like it and your experience was positive.

About

GTM tracking

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0