From 5034a3b8e5201d976f7deb210b471caa50ea16cd Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 23 May 2018 01:05:36 +0200 Subject: [PATCH] save some lines --- src/gatsby-ssr.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gatsby-ssr.js b/src/gatsby-ssr.js index 62d75e2..f50f658 100644 --- a/src/gatsby-ssr.js +++ b/src/gatsby-ssr.js @@ -5,7 +5,6 @@ function buildTrackingCode(pluginOptions) { const html = ` window.dev = ${pluginOptions.dev} - if (window.dev === true || !(navigator.doNotTrack == '1' || window.doNotTrack == '1')) { window._paq = window._paq || []; window._paq.push(['setTrackerUrl', '${pluginOptions.matomoUrl}/piwik.php']); @@ -14,23 +13,18 @@ function buildTrackingCode(pluginOptions) { window._paq.push(['trackPageView']); window._paq.push(['enableHeartBeatTimer']); window.start = new Date(); - if (window.dev === true) { console.log('[Matomo] Tracking initialized') console.log('[Matomo] matomoUrl: ${pluginOptions.matomoUrl}, siteId: ${pluginOptions.siteId}') } - var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; - g.defer=true; g.async=true; - g.src='${script}' - s.parentNode.insertBefore(g,s); + g.defer=true; g.async=true; g.src='${script}'; s.parentNode.insertBefore(g,s); } ` return (