Skip to content

Commit a217248

Browse files
Merge pull request #169 from UnsignedArduino/staging
Gosh damn it Google Tag Manager is back
2 parents 038e268 + eae80e1 commit a217248

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Google Analytics measurement ID - not required
22
NEXT_PUBLIC_GA_MEASUREMENT_ID = "G-XXXXXXXXXX"
3+
// Google Tag Manager ID - not required
4+
NEXT_PUBLIC_GTM_ID = "GTM-XXXXXXXX"
35
// Google Adsense publisher ID - not required
46
NEXT_PUBLIC_ADSENSE_PUBLISHER_ID = "pub-XXXXXXXXXXXXXXXX"
57
// GitHub OAuth

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
"prepare": "husky install"
5151
},
5252
"dependencies": {
53+
"@codemirror/language": "6.0.0",
5354
"@growthbook/growthbook-react": "^1.1.0",
55+
"@magicul/next-google-tag-manager": "^2.0.0",
5456
"@popperjs/core": "2.11.8",
5557
"@tippyjs/react": "^4.2.6",
5658
"@types/bootstrap": "^5.2.10",
@@ -87,11 +89,10 @@
8789
"remark-parse": "^11.0.0",
8890
"remark-rehype": "^11.1.0",
8991
"sass": "^1.77.7",
92+
"scheduler": "^0.19.0",
9093
"tinacms": "^1.6.5",
9194
"tippy.js": "^6.3.7",
92-
"unified": "^11.0.5",
93-
"scheduler": "^0.19.0",
94-
"@codemirror/language": "6.0.0"
95+
"unified": "^11.0.5"
9596
},
9697
"devDependencies": {
9798
"@tinacms/cli": "^1.5.47",

src/pages/_app.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import "katex/dist/katex.min.css";
77
import "tippy.js/dist/tippy.css";
88
import Adsense from "../components/Adsense";
99
import Analytics from "../components/Analytics";
10+
import GoogleTagManager from "@magicul/next-google-tag-manager";
1011
import ErrorBoundary from "../components/ErrorBoundary";
1112
import { SessionProvider } from "next-auth/react";
1213
import { useRouter } from "next/router";
@@ -114,6 +115,7 @@ export default function AwesomeArcadeExtensions({
114115
options={{ showSpinner: false }}
115116
/>
116117
<Analytics />
118+
<GoogleTagManager id={process.env.NEXT_PUBLIC_GTM_ID!} />
117119
<Adsense />
118120
<GrowthBookProvider growthbook={growthbook}>
119121
<SessionProvider session={session}>

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,11 @@
11131113
dependencies:
11141114
"@lezer/common" "^1.0.0"
11151115

1116+
"@magicul/next-google-tag-manager@^2.0.0":
1117+
version "2.0.0"
1118+
resolved "https://registry.yarnpkg.com/@magicul/next-google-tag-manager/-/next-google-tag-manager-2.0.0.tgz#04a77b506a4385f84cf637267984bd6f334f5ce0"
1119+
integrity sha512-NXp0iGxdcAZL9IkkWwh2GS3dE1qSn4hGxXADnvt1li4gAXyxJ9AEDTrgqMVXIDzkGTD7Q0n37BJoCZdmwIXE+g==
1120+
11161121
"@monaco-editor/loader@^1.3.2":
11171122
version "1.4.0"
11181123
resolved "https://registry.yarnpkg.com/@monaco-editor/loader/-/loader-1.4.0.tgz#f08227057331ec890fa1e903912a5b711a2ad558"

0 commit comments

Comments
 (0)