diff --git a/package.json b/package.json index cdcf3a878ed..15e3435ff5e 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "@docusaurus/plugin-content-pages": "^3.4.0", "@docusaurus/theme-common": "^3.0.0", "@docusaurus/theme-mermaid": "^3.0.0", + "@intercom/messenger-js-sdk": "^0.0.11", "@mdx-js/react": "^3.0.0", "@metamask/design-tokens": "^1.11.1", "@metamask/docusaurus-openrpc": "^0.4.1", diff --git a/src/theme/Footer/index.js b/src/theme/Footer/index.js index ef819cdf155..2300692808e 100644 --- a/src/theme/Footer/index.js +++ b/src/theme/Footer/index.js @@ -1,5 +1,7 @@ import React, { useEffect } from "react"; import Footer from "@theme-original/Footer"; +import { Intercom } from "@intercom/messenger-js-sdk"; +import useIsBrowser from "@docusaurus/useIsBrowser"; export default function FooterWrapper(props) { useEffect(() => { @@ -14,6 +16,14 @@ export default function FooterWrapper(props) { cookieBtn.removeEventListener("click", handleManageCookie); }; }, []); + + const isBrowser = useIsBrowser(); + if (isBrowser) { + Intercom({ + app_id: 'txttgas6' + }); + } + return ( <>