From 6cda5f51c44bcfe4bd81bd566ac2788bba06b00a Mon Sep 17 00:00:00 2001 From: Shawn Leberknight Date: Tue, 23 Jul 2024 14:15:09 -0400 Subject: [PATCH 1/2] add script tags to embed scout copilot --- docusaurus.config.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index 1f0f6fa30..3a7ebef85 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -205,6 +205,26 @@ module.exports = { }, }, ], + postBodyTags: [ + { + tagName: 'script', + attributes: { + type: 'text/javascript', + }, + innerHTML: ` + document.addEventListener('DOMContentLoaded', function() { + var copilot = document.createElement('co-pilot'); + copilot.setAttribute('copilot_id', 'your-copilot-id-here'); + document.body.appendChild(copilot); + + var script = document.createElement('script'); + script.setAttribute('type', 'module'); + script.setAttribute('src', 'https://ui.scoutos.com/copilot.js'); + document.body.appendChild(script); + }); + `, + }, + ], }; }, }; From deac37b73dffa3307086b4237232150f62346d40 Mon Sep 17 00:00:00 2001 From: Shawn Leberknight Date: Tue, 23 Jul 2024 14:53:50 -0400 Subject: [PATCH 2/2] add copilot id for statsig --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 3a7ebef85..744b4071f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -214,7 +214,7 @@ module.exports = { innerHTML: ` document.addEventListener('DOMContentLoaded', function() { var copilot = document.createElement('co-pilot'); - copilot.setAttribute('copilot_id', 'your-copilot-id-here'); + copilot.setAttribute('copilot_id', '6f8EwgjiL'); document.body.appendChild(copilot); var script = document.createElement('script');