Skip to content

Commit fd09bad

Browse files
markhoneyulivz
authored andcommitted
docs: fix for Google Analytics instructions (#1120)
1 parent 78f24f3 commit fd09bad

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/docs/docs/miscellaneous/migration-guide.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,26 @@ sidebar: auto
88

99
### ga <Badge text="replaced"/>
1010

11-
GA has been separated into a standalone plugin [@vuepress/google-analytics](../plugin/official/plugin-google-analytics.md).
11+
GA has been separated into a standalone plugin [@vuepress/plugin-google-analytics](../plugin/official/plugin-google-analytics.md).
1212

1313
::: upgrade
1414

15-
1. Install `@vuepress/google-analytics`:
15+
1. Install `@vuepress/plugin-google-analytics`:
1616

1717
```bash
18-
yarn add @vuepress/google-analytics -D
18+
yarn add -D @vuepress/plugin-google-analytics
1919
```
2020

2121
2. Update `vuepress/config.js`:
2222

2323
```diff
2424
module.exports = {
25-
- markdown: {
26-
- config(md) { /* ... */ }
27-
- },
28-
+ extendMarkdown(md) { /* ... */ }
25+
- ga: 'UA-12345678-9'
26+
},
27+
plugins: {
28+
+ '@vuepress/google-analytics': {
29+
+ ga: 'UA-12345678-9'
30+
+ }
2931
}
3032
```
3133
:::

0 commit comments

Comments
 (0)