You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

35 lines
1.7 KiB

diff --git a/node_modules/@next/plugin-google-analytics/src/document-head-tags-server.js b/node_modules/@next/plugin-google-analytics/src/document-head-tags-server.js
index d10a05b..b27a7c4 100644
--- a/node_modules/@next/plugin-google-analytics/src/document-head-tags-server.js
+++ b/node_modules/@next/plugin-google-analytics/src/document-head-tags-server.js
@@ -5,7 +5,7 @@ export default async function headTags() {
<>
<script
async
- src={`https://www.googletagmanager.com/gtag/js?id=${process.env.GA_TRACKING_ID}`}
+ src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_TRACKING_ID}`}
/>
<script
dangerouslySetInnerHTML={{
@@ -13,7 +13,7 @@ export default async function headTags() {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
- gtag('config', '${process.env.GA_TRACKING_ID}');
+ gtag('config', '${process.env.NEXT_PUBLIC_GA_TRACKING_ID}');
`,
}}
/>
diff --git a/node_modules/@next/plugin-google-analytics/src/on-init-client.js b/node_modules/@next/plugin-google-analytics/src/on-init-client.js
index 094b2c9..e250a31 100644
--- a/node_modules/@next/plugin-google-analytics/src/on-init-client.js
+++ b/node_modules/@next/plugin-google-analytics/src/on-init-client.js
@@ -1,7 +1,7 @@
export default async function initClient({ router }) {
router.events.on('routeChangeComplete', (url) => {
setTimeout(() => {
- window.gtag('config', process.env.GA_TRACKING_ID, {
+ window.gtag('config', process.env.NEXT_PUBLIC_GA_TRACKING_ID, {
page_location: url,
page_title: document.title,
})