Merge pull request #587 from outline/fix-static-page-tracking

Restore static pageview tracking
This commit is contained in:
Tom Moor
2018-02-11 10:54:29 -08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -132,8 +132,6 @@ window.addEventListener('load', async () => {
// https://github.com/googleanalytics/autotrack/issues/137#issuecomment-305890099
await import('autotrack/autotrack.js');
window.ga('create', process.env.GOOGLE_ANALYTICS_ID, 'auto');
window.ga('require', 'outboundLinkTracker');
window.ga('require', 'urlChangeTracker');
window.ga('send', 'pageview');
});

View File

@@ -10,6 +10,8 @@ function Analytics() {
dangerouslySetInnerHTML={{
__html: `
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', ${process.env.GOOGLE_ANALYTICS_ID}, 'auto');
ga('send', 'pageview');
`,
}}
/>