scripts option of docusaurus.config.js to every page. You add the widget there.
Before you start
- A website widget with your site on its Allowed origins list. You need the widget id and public key from its snippet.
Add the widget
Open docusaurus.config.js
It is at the root of your project. In a TypeScript project it is
docusaurus.config.ts.Add the widget to scripts
Add this inside your config object. If Replace
scripts already exists, add the entry to it.docusaurus.config.js
YOUR_WIDGET_ID and kl_pk_... with the values from your widget’s snippet.