Skip to main content

gtag-hook

TL;DR

Adds the Google Analytics to the documentation.

Integration:

1. Add dependency

yarn add -WD "@docusaurus-tde/gtag-hook"

2. Connect the hook

docusaurus-tde.config.js

module.exports = {
hooks: [
['@docusaurus-tde/gtag-hook', { trackingID: '<trackingID>' }],
]
}

Hook configuration:

type gtagHookProps = {
trackingID: string;
anonymizeIP?: boolean; // default: true
}