Skip to main content
Version: 2.0.0-beta.0

๐Ÿ“ฆ plugin-google-analytics

๊ธฐ๋ณธ ๊ตฌ๊ธ€ ์• ๋„๋ฆฌํ‹ฑ์Šค ํ”Œ๋Ÿฌ๊ทธ์ธ์ž…๋‹ˆ๋‹ค. It is a JavaScript library for measuring how users interact with your website in the production build. If you are using Google Analytics 4 you might need to consider using plugin-google-gtag instead.

์„ค์น˜#

npm install --save @docusaurus/plugin-google-analytics
tip

@docusaurus/preset-classic์„ ์„ค์น˜ํ•œ ๊ฒฝ์šฐ์—๋Š” ๊ธฐ๋ณธ ํŽ˜์ด์ง€ ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ๋”ฐ๋กœ ์„ค์น˜ํ•  ํ•„์š”๋Š” ์—†์Šต๋‹ˆ๋‹ค.

์„ค์ •#

docusaurus.config.js
module.exports = {
plugins: ['@docusaurus/plugin-google-analytics'],
themeConfig: {
googleAnalytics: {
trackingID: 'UA-141789564-1',
// ์˜ต์…˜ ํ•ญ๋ชฉ
anonymizeIP: true, // ์ต๋ช… IP๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค๋ฉด
},
},
};