Analytics
You can track page views using Microsoft Application Insights in the deployed web site. There are many other analytics platforms supported by Docusaurus through other plugins.
Insert your application insights web configuration in the docusaurus.config.js
file with, at least,
the instrumentationKey
. By default, cookies are disabled.
./docusaurus.config.js
...
const config = configure({ ... }, {
appInsights: {
config: {
instrumentationKey: "YOUR KEY HERE"
}
enableClickAnalytics: false,
}
})
Options
The following options are available:
Field | Type | Required | Default Value | Description |
---|---|---|---|---|
config | ApplicationInsightsConfig | Yes | N/A | This object holds the configuration for Application Insights. It has many possible fields including instrumentationKey , endpointUrl , maxBatchInterval , etc. See ApplicationInsights-JS Configuration for full details. |
enableClickAnalytics | boolean | No | false | If set to true , enables click analytics. |