Skip to content

Commit

Permalink
chore: add hotjar
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Oct 21, 2024
1 parent 715e3cb commit 5215585
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
15 changes: 14 additions & 1 deletion apps/marginfi-landing-page/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Script from "next/script";
import { SpeedInsights } from "@vercel/speed-insights/next";
import { GoogleAnalytics, GoogleTagManager } from "@next/third-parties/google";

import { Header } from "~/components/header";

import type { Metadata } from "next";
Expand All @@ -27,6 +27,19 @@ export default function RootLayout({
<>
<GoogleAnalytics gaId="G-TS0DF3DM7G" />
<GoogleTagManager gtmId="GTM-53CZ2GG8" />
<Script
id="hotjar-script"
dangerouslySetInnerHTML={{
__html: `(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:5178229,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,
}}
/>
<SpeedInsights />
</>
)}
Expand Down
14 changes: 14 additions & 0 deletions apps/marginfi-v2-trading/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";

import App, { AppContext, AppInitialProps, AppProps } from "next/app";
import Script from "next/script";
import { useRouter } from "next/router";
import { SpeedInsights } from "@vercel/speed-insights/next";

Expand Down Expand Up @@ -88,6 +89,19 @@ export default function MrgnApp({ Component, pageProps, path, bank }: AppProps &
<>
<GoogleAnalytics gaId="G-T5B2WRLKL9" />
<GoogleTagManager gtmId="GTM-WFBC4RZ7" />
<Script
id="hotjar-script"
dangerouslySetInnerHTML={{
__html: `(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:5178229,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,
}}
/>
<SpeedInsights />
</>
)}
Expand Down
15 changes: 14 additions & 1 deletion apps/marginfi-v2-ui/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import App, { AppContext, AppInitialProps, AppProps } from "next/app";
import Script from "next/script";
import { SpeedInsights } from "@vercel/speed-insights/next";
import { GoogleAnalytics, GoogleTagManager } from "@next/third-parties/google";
import dynamic from "next/dynamic";
Expand Down Expand Up @@ -170,6 +170,19 @@ export default function MrgnApp({ Component, pageProps, path }: AppProps & MrgnA
<>
<GoogleAnalytics gaId="G-0ZTQRWVG02" />
<GoogleTagManager gtmId="GTM-KJJ3CR6Q" />
<Script
id="hotjar-script"
dangerouslySetInnerHTML={{
__html: `(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:5178229,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,
}}
/>
<SpeedInsights />
</>
)}
Expand Down

0 comments on commit 5215585

Please sign in to comment.