Skip to content

Commit

Permalink
Update root.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbrig authored Oct 3, 2024
1 parent 491e060 commit 8ba22bd
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions app/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import "./styles/typography.css";
import './styles/global.css';

import ScrollToTopButton from "./components/ScrollToTopButton";
// import ChatbotScript from "./components/ChatBot";
import ChatbotScript from "./components/ChatBot";

export const meta: MetaFunction = () => {
return [
Expand All @@ -46,8 +46,29 @@ export function Layout({ children }: { children: React.ReactNode }) {
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
<script
async
id="gtm-init"
dangerouslySetInnerHTML={{
__html: `
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-K6DB8PVD');
`,
}}
/>
</head>
<body>
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-K6DB8PVD"
height="0"
width="0"
style={{ display: 'none', visibility: 'hidden' }}
></iframe>
</noscript>
{process.env.NODE_ENV === "development" || !gaTrackingId ? null : (
<>
<script
Expand All @@ -74,7 +95,7 @@ export function Layout({ children }: { children: React.ReactNode }) {
{[children, <ScrollToTopButton key={0} />]}
<ScrollRestoration />
<Scripts />
{/* <ChatbotScript /> */}
<ChatbotScript />
</body>
</html>
);
Expand Down

1 comment on commit 8ba22bd

@vercel
Copy link

@vercel vercel bot commented on 8ba22bd Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.