Skip to content
CDGet
  • Home
  • Projects
  1. Home
  2. All projects
  3. GTag-GA

GTag-GA

LibraryUtility

A small ES module that sends Google Analytics 4 page views and events straight from Node.js. One import, one configuration call, and no dependencies.

Documentation (opens in a new tab)Source code (opens in a new tab)

About this project

GTag-GA sends Google Analytics 4 page views and events through the official gtag.js interface, packaged as a Node.js ES module. One import and one call with a measurement ID, and tracking is live.

The API is the gtag API rather than a vocabulary of its own: the initialising call takes the measurement ID and an optional configuration object, and the event call takes the same arguments the official documentation shows, so anything written about gtag.js applies directly here.

The package has zero dependencies, ships TypeScript declarations, follows current Google Analytics 4 behaviour and runs anywhere an ES module does. It is a few kilobytes for the one job of getting a page view or an event to Google Analytics without a tag manager in between.

Features

  • TypeScript types

  • No dependencies

Project information

Started
2023
License
MIT (opens in a new tab)
Programming languages
JavaScript
Tags
google-analyticsgtaganalyticsevent-trackingnodejs
Packages
gtag-ga (opens in a new tab)npm
Popularity
15
GitHub stars
359
npm downloads
GTag-GA — npm downloads, Last 30 days
npm downloads
Jul 3113
Aug 12
Aug 21
Aug 314
Aug 422
Aug 519
Aug 626
Aug 725
Aug 81
Aug 95
Aug 1016
Aug 110
Aug 120
Aug 1319
Aug 140
Aug 153
Aug 162
Aug 178
Aug 1820
Aug 1946
Aug 2016
Aug 2113
Aug 224
Aug 230
Aug 2420
Aug 258
Aug 2616
Aug 2713
Aug 2820
Aug 297
Last 30 days
ContactDonate
The projects listed here are open source under the MIT License.© 2026 CDGet. All rights reserved.