diff --git a/docusaurus.config.js b/docusaurus.config.js index 028321a904a..d8ec8d81899 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -40,6 +40,10 @@ const config = { './src/plugins/scarf-tracking.js', {}, ], + [ + './src/plugins/reo-tracking.js', + {}, + ], ], presets: [ [ diff --git a/src/plugins/reo-tracking.js b/src/plugins/reo-tracking.js new file mode 100644 index 00000000000..bd0a195333e --- /dev/null +++ b/src/plugins/reo-tracking.js @@ -0,0 +1,21 @@ +module.exports = function reoTrackingPlugin(context, options) { + return { + name: 'reo-tracking-plugin', + + injectHtmlTags() { + return { + headTags: [ + { + tagName: 'script', + attributes: { + type: 'text/javascript', + }, + innerHTML: ` + !function(){var e,t,n;e="ba3e4c1a4c1fd1a",t=function(){Reo.init({clientID:"ba3e4c1a4c1fd1a"})},(n=document.createElement("script")).src="https://static.reo.dev/"+e+"/reo.js",n.async=!0,n.onload=t,document.head.appendChild(n)}(); + `, + }, + ], + }; + }, + }; +};