Skip to content

Commit

Permalink
sends Google Analytics correct url path on fresh page load (#10146)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanekunz authored and Luis Alvarez D committed Jan 20, 2020
1 parent acca2c0 commit ec658fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/with-google-analytics/pages/_document.js
Expand Up @@ -20,7 +20,9 @@ export default class extends Document {
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${GA_TRACKING_ID}');
gtag('config', '${GA_TRACKING_ID}', {
page_path: window.location.pathname,
});
`,
}}
/>
Expand Down

0 comments on commit ec658fc

Please sign in to comment.