1.0.3 • Published 12 months ago

rsbuild-plugin-google-analytics v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

rsbuild-plugin-google-analytics

An Rsbuild plugin to setup Google Analytics in your website.

Usage

Install:

npm add rsbuild-plugin-google-analytics -D

Add plugin to your rsbuild.config.ts:

// rsbuild.config.ts
import { pluginGoogleAnalytics } from 'rsbuild-plugin-google-analytics';

export default {
  plugins: [
    pluginGoogleAnalytics({
      // replace this with your Google tag ID
      // see: https://support.google.com/analytics/answer/9539598?hl=en
      id: 'G-xxxxxxxxxx',
    }),
  ],
};

Options

Here are the available options:

NameTypeDescriptionDefaults
idstringGoogle tag IDundefined
enablebooleanWhether to enable Google Analyticstrue

License

MIT.

1.0.3

12 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.0-beta.1

1 year ago

1.0.0-beta.0

1 year ago