Dan Abramov
3 years ago
1 changed files with 0 additions and 35 deletions
@ -1,35 +0,0 @@ |
|||
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, |
|||
}) |
Loading…
Reference in new issue