Skip to content

Commit

Permalink
changing ga to gtm
Browse files Browse the repository at this point in the history
  • Loading branch information
TalBenAvi committed Mar 17, 2024
1 parent 32492d0 commit 16c0ac3
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions workspaces/website/src/renderer/_default.page.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function render(pageContext: PageContextServer) {
userAgent: pageContext.userAgent,
});

const GOOGLE_TAG_ID = "G-WY42TERK5P";
const GOOGLE_GTM_ID = "GTM-K6LVSCS9";
const pageSeo = (pageProps?.data ??
pageProps?.roadmapPost ??
pageProps?.tutorial) as SeoType;
Expand Down Expand Up @@ -123,15 +123,14 @@ export async function render(pageContext: PageContextServer) {
}
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=${GOOGLE_TAG_ID}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GOOGLE_TAG_ID}');
</script>
<!-- Google Tag Manager -->
<script>(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=${GOOGLE_GTM_ID}'+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','${GOOGLE_GTM_ID}');</script>
<!-- End Google Tag Manager -->
<!-- Hotjar Tracking Code for Starknet -->
<script>
(function(h,o,t,j,a,r){
Expand All @@ -153,7 +152,12 @@ export async function render(pageContext: PageContextServer) {
}
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K6LVSCS9"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="page-view">${stream}</div>
</body>
</html>`;

Expand Down

0 comments on commit 16c0ac3

Please sign in to comment.