Skip to content

Commit

Permalink
add reo tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
markurtz committed Jun 6, 2024
1 parent bc20c9f commit a69febf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const config = {
'./src/plugins/scarf-tracking.js',
{},
],
[
'./src/plugins/reo-tracking.js',
{},
],
],
presets: [
[
Expand Down
21 changes: 21 additions & 0 deletions src/plugins/reo-tracking.js
Original file line number Diff line number Diff line change
@@ -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)}();
`,
},
],
};
},
};
};

0 comments on commit a69febf

Please sign in to comment.