Skip to content
PluginStats

ga4-webpack-plugin weekly downloads statistics

By jxmked · npm · Webpack plugins

Injecting Google snippet into HTML for Analytics

View on npm Outdated · Nov 21, 2026

ga4-webpack-plugin has 4 recorded weekly downloads on npm, a decrease of 80.0% over the past 30 days, ranking #3240 of 3,247 tracked listings.

Weekly downloads
4
Official API · Dec 5, 2026
7-day growth
-81.8%
-18 weekly downloads
30-day growth
-80.0%
-16 weekly downloads
90-day growth
-33.3%
-2 weekly downloads
Rank
#3240
▼ 455 in 7 days

About ga4-webpack-plugin

ga4-webpack-plugin

The ga4-webpack-plugin simplifies injecting the Google Analytics 4 (GA4) snippet into your HTML using Webpack.

Install

Install the plugin via npm: npm i --save-dev ga4-webpack-plugin

Setup

Add the plugin to your webpack configuration:

// webpack.config.js

const GA4WebpackPlugin = require('ga4-webpack-plugin');

module.exports = {
  // ... other webpack configuration options

  plugins: [
    new GA4WebpackPlugin({
      // Your GA4 Measurement ID (required)
      id: "GA_MEASUREMENT_ID",

      // Whether to inject the GA4 snippet into HTML (default: true)
      inject: true,

      // Automatically trigger a page view on load (default: true)
      callPageView: true,

      // Show log
      showLog: false,
      
      // Parameters that will pass to gtag("config", ID, <HERE>)
      param: {
        "application_version": "v1.2.3" // example
      }
    })
  ]
}

Note: Ensure you replace "GA_MEASUREMENT_ID" with your actual GA4 Measurement ID.

The script will be injected before your head tag closing.

Injected HTML

The plugin injects the following code into your HTML:

<!-- Google Analytics 4 (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag() {
    dataLayer.push(arguments);
  }
  gtag('js', new Date());

  gtag('config', 'GA_MEASUREMENT_ID');
</script>

Optionally, you can enable callPageView: true in the plugin options to automatically trigger the page view. This adds:

gtag('js', new Date());
gtag('config', 'GA_MEASUREMENT_ID');

to your injected code.

Social

Description from the npm listing.

  • ga4
  • webpack-plugin
  • plugin

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

ga4-webpack-plugin weekly downloads on npm, last 90 days: 4 weekly downloads as of Dec 5, 2026, -33.3% over 90 days.ga4-webpack-pluginWeekly downloads on npm · Last 90 days4downloads / week-33.3% over 90 days050100150200250Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
ga4-webpack-plugin weekly downloads on npm, last 90 days: 4 weekly downloads as of Dec 5, 2026, -33.3% over 90 days.

7/30/90-day growth

ga4-webpack-plugin weekly downloads growth on npm: -81.8% over 7 days, -80.0% over 30 days, -33.3% over 90 days.ga4-webpack-pluginWeekly downloads growth on npm4downloads / week now7-day growth-18 weekly downloads-81.8%30-day growth-16 weekly downloads-80.0%90-day growth-2 weekly downloads-33.3%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
ga4-webpack-plugin weekly downloads growth on npm: -81.8% over 7 days, -80.0% over 30 days, -33.3% over 90 days.

Ranking history

ga4-webpack-plugin npm ranking history: currently #3240 (by weekly downloads).ga4-webpack-pluginnpm ranking · by weekly downloads · Last 90 days#3240current rank#1600#1800#2000#2200#2400#2600#2800#3000#3200#3400Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 36 observations · Updated Dec 5, 2026pluginstats.com
ga4-webpack-plugin npm ranking history: currently #3240 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 163, #2 (overall #3,242)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 18, #9 (overall #349)
Webpack plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for ga4-webpack-plugin
Date (UTC)Weekly downloadsChange vs. previous
40
4-1
5+1
4-1
50
5-14
19-3
220
22+1
210
210
21-2
23+16
7—

Similar npm Webpack plugins plugins

All 20 ga4-webpack-plugin alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/ga4-webpack-plugin. First seen Oct 16, 2026; last successful collection Nov 21, 2026. See the methodology.