mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
chore: release Docusaurus v3.4 (#10186)
This commit is contained in:
parent
a7afd9cc87
commit
dbdd4dfb2e
145 changed files with 21407 additions and 203 deletions
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
sidebar_position: 11
|
||||
slug: /api/plugins/@docusaurus/plugin-vercel-analytics
|
||||
---
|
||||
|
||||
# 📦 plugin-vercel-analytics
|
||||
|
||||
import APITable from '@site/src/components/APITable';
|
||||
|
||||
[Vercel Analytics](https://vercel.com/docs/analytics) provides comprehensive insights into your website's visitors, tracking top pages, referrers, and demographics like location, operating systems, and browser info.
|
||||
|
||||
:::warning production only
|
||||
|
||||
This plugin is always inactive in development and **only active in production** (`docusaurus build`) to avoid polluting the analytics statistics.
|
||||
|
||||
:::
|
||||
|
||||
## Installation {#installation}
|
||||
|
||||
```bash npm2yarn
|
||||
npm install --save @docusaurus/plugin-vercel-analytics
|
||||
```
|
||||
|
||||
## Configuration {#configuration}
|
||||
|
||||
Accepted fields:
|
||||
|
||||
```mdx-code-block
|
||||
<APITable>
|
||||
```
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `mode` | `string` | `'auto'` | Override the automatic environment detection. Read the [official docs](https://vercel.com/docs/analytics/package#mode) for details. |
|
||||
| `debug` | `boolean` | `undefined` | Enable browser console logging of analytics events. Read the [official docs](https://vercel.com/docs/analytics/package#debug) for details. |
|
||||
|
||||
```mdx-code-block
|
||||
</APITable>
|
||||
```
|
||||
|
||||
### Example configuration {#ex-config}
|
||||
|
||||
You can configure this plugin through plugin options.
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
plugins: [
|
||||
[
|
||||
'vercel-analytics',
|
||||
{
|
||||
debug: true,
|
||||
mode: 'auto',
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue