Skip to content

Commit 6c5f13e

Browse files
authored
Add google tag manager (#40)
* Add blog * Add more titles * Switch to Google Tag Manager
1 parent a410f12 commit 6c5f13e

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

src/app/ai/ai.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const headlineTexts = [
3939
"digital officer",
4040
"product people",
4141
"co-founder",
42+
"developers",
43+
"designers"
4244
];
4345

4446
export default function AiPage({ className }: AiPageProps) {

src/app/layout.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ export default function RootLayout({
3737
/>
3838
<meta name="msapplication-TileColor" content="#9e5381" />
3939
<meta name="theme-color" content="#9e5381" />
40+
{/* Google Tag Manager */}
4041
<script
4142
dangerouslySetInnerHTML={{
42-
__html: `(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
43-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
44-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
45-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
46-
47-
ga('create', 'UA-74284223-1', 'auto');
48-
ga('send', 'pageview');`,
43+
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
44+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
45+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
46+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
47+
})(window,document,'script','dataLayer','GTM-N6SVS9RS');`,
4948
}}
5049
/>
50+
{/* End Google Tag Manager */}
5151
{/*
5252
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png"/>
5353
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png"/>
@@ -59,6 +59,16 @@ export default function RootLayout({
5959
*/}
6060
</head>
6161
<body className={cn(inter.className, manrope.className)}>
62+
{/* Google Tag Manager (noscript) */}
63+
<noscript>
64+
<iframe
65+
src="https://www.googletagmanager.com/ns.html?id=GTM-N6SVS9RS"
66+
height="0"
67+
width="0"
68+
style={{ display: "none", visibility: "hidden" }}
69+
/>
70+
</noscript>
71+
{/* End Google Tag Manager (noscript) */}
6272
<div className="min-h-screen">{children}</div>
6373
</body>
6474
</html>

0 commit comments

Comments
 (0)