From 378bfaeafefc4100531692e9a3be2075ffc2c0b3 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 10 Feb 2018 23:54:54 -0800 Subject: [PATCH] Fix autotrack not building correctly in prod --- app/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/index.js b/app/index.js index b772f37d8..36e82c46e 100644 --- a/app/index.js +++ b/app/index.js @@ -129,8 +129,8 @@ window.addEventListener('load', async () => { // no point loading the rest of the analytics bundles if (!process.env.GOOGLE_ANALYTICS_ID || !window.ga) return; - await import('autotrack/lib/plugins/outbound-link-tracker'); - await import('autotrack/lib/plugins/url-change-tracker'); + // 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');