What is @docusaurus/plugin-google-analytics?
@docusaurus/plugin-google-analytics is a plugin for Docusaurus, a popular static site generator. This plugin allows you to integrate Google Analytics into your Docusaurus site, enabling you to track and analyze the traffic and user behavior on your site.
What are @docusaurus/plugin-google-analytics's main functionalities?
Basic Integration
This feature allows you to integrate Google Analytics into your Docusaurus site by providing your Google Analytics tracking ID.
{
"plugins": [
[
"@docusaurus/plugin-google-analytics",
{
"trackingID": "UA-XXXXXX-X"
}
]
]
}
Custom Configuration
This feature allows you to customize the Google Analytics configuration, such as anonymizing IP addresses for privacy compliance.
{
"plugins": [
[
"@docusaurus/plugin-google-analytics",
{
"trackingID": "UA-XXXXXX-X",
"anonymizeIP": true
}
]
]
}
Other packages similar to @docusaurus/plugin-google-analytics
react-ga
react-ga is a JavaScript module that allows you to easily add Google Analytics to your React application. It provides a simple API for tracking page views, events, and other interactions. Compared to @docusaurus/plugin-google-analytics, react-ga is more flexible and can be used in any React project, not just Docusaurus.
gatsby-plugin-google-analytics
gatsby-plugin-google-analytics is a plugin for Gatsby, another popular static site generator. It allows you to easily add Google Analytics to your Gatsby site. Similar to @docusaurus/plugin-google-analytics, it simplifies the integration process but is specific to Gatsby.
vue-analytics
vue-analytics is a plugin for Vue.js that integrates Google Analytics into your Vue application. It provides a range of features for tracking page views, events, and more. Like @docusaurus/plugin-google-analytics, it is designed to simplify the integration of Google Analytics but is specific to Vue.js.
2.0.0-alpha.38 (2019-12-06)
:boom: Breaking Change
docusaurus-plugin-content-blog
, docusaurus-plugin-content-docs
, docusaurus-plugin-content-pages
, docusaurus-theme-classic
, docusaurus-utils
- #2088 perf(v2): smaller bundlesize by embedding metadata to content (@endiliey)
If you have swizzled any Docs/Blog component that depends on metadata, you'll have to update. If you haven't, no action is needed.
For example, if you've swizzled @theme/DocItem
. You'll have to update
- const {metadata, content: DocContent} = props;
+ const {content: DocContent} = props;
+ const {metadata} = DocContent;
:bug: Bug Fix
docusaurus
docusaurus-plugin-ideal-image
- #2074 fix(v2): fix plugin-ideal-image breaking website (exports not defined) (@endiliey)
:nail_care: Polish
:house: Internal
docusaurus-1.x
docusaurus
- #2081 refactor(v2): move scripts/stylesheets injection to server side (@endiliey)
- #2080 refactor(v2): minor code refactoring on component creator (@endiliey)
:running_woman: Performance
docusaurus-utils
- #2089 perf(v2): improve dev build time by not overwriting file if possible (@endiliey)
docusaurus-theme-search-algolia
- #2079 perf(v2): algolia search result no longer cause full page refresh (@endiliey)
- #2076 perf(v2): load algolia JS only when user interacts with search (@endiliey)
Committers: 4