Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/rspack-contrib/rsbuild-plugin-google-analytics

An Rsbuild plugin to setup Google Analytics in your website.
https://github.com/rspack-contrib/rsbuild-plugin-google-analytics

plugin rsbuild rspack

Last synced: 3 months ago
JSON representation

An Rsbuild plugin to setup Google Analytics in your website.

Lists

README

        

# rsbuild-plugin-google-analytics

An Rsbuild plugin to setup Google Analytics in your website.



npm version

license

## Usage

Install:

```bash
npm add rsbuild-plugin-google-analytics -D
```

Add plugin to your `rsbuild.config.ts`:

```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:

| Name | Type | Description | Defaults |
| ---- | -------- | ------------- | ----------- |
| id | `string` | Google tag ID | `undefined` |

## License

[MIT](./LICENSE).