From 1f93915b96a6a37205755ad2f77e6108c2fc2a4c Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Wed, 3 Jul 2024 13:06:06 -0700 Subject: [PATCH 1/2] docs: add new js snippet --- docs-website/docusaurus.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs-website/docusaurus.config.js b/docs-website/docusaurus.config.js index 4d07b51547e7b..8c9b7b7d1ed9e 100644 --- a/docs-website/docusaurus.config.js +++ b/docs-website/docusaurus.config.js @@ -19,6 +19,11 @@ module.exports = { async: true, defer: true, }, + { + src: "./src/rb2b.js", + async: true, + defer: true, + } ], noIndex: isSaas, customFields: { From 456aa4cd480a79f92c6c872a0b59b9a3c1d8abd2 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Wed, 3 Jul 2024 13:56:36 -0700 Subject: [PATCH 2/2] fix urls --- docs-website/docusaurus.config.js | 2 +- docs-website/static/scripts/rb2b.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 docs-website/static/scripts/rb2b.js diff --git a/docs-website/docusaurus.config.js b/docs-website/docusaurus.config.js index 8c9b7b7d1ed9e..c1cb51bfb1a80 100644 --- a/docs-website/docusaurus.config.js +++ b/docs-website/docusaurus.config.js @@ -20,7 +20,7 @@ module.exports = { defer: true, }, { - src: "./src/rb2b.js", + src: "/scripts/rb2b.js", async: true, defer: true, } diff --git a/docs-website/static/scripts/rb2b.js b/docs-website/static/scripts/rb2b.js new file mode 100644 index 0000000000000..684c981116bd9 --- /dev/null +++ b/docs-website/static/scripts/rb2b.js @@ -0,0 +1 @@ +!function () {var reb2b = window.reb2b = window.reb2b || [];if (reb2b.invoked) return;reb2b.invoked = true;reb2b.methods = ["identify", "collect"];reb2b.factory = function (method) {return function () {var args = Array.prototype.slice.call(arguments);args.unshift(method);reb2b.push(args);return reb2b;};};for (var i = 0; i < reb2b.methods.length; i++) {var key = reb2b.methods[i];reb2b[key] = reb2b.factory(key);}reb2b.load = function (key) {var script = document.createElement("script");script.type = "text/javascript";script.async = true;script.src = "https://s3-us-west-2.amazonaws.com/b2bjsstore/b/" + key + "/reb2b.js.gz";var first = document.getElementsByTagName("script")[0];first.parentNode.insertBefore(script, first);};reb2b.SNIPPET_VERSION = "1.0.1";reb2b.load("8XOE9GHYQ3OM");}(); \ No newline at end of file