Skip to content

Commit

Permalink
fix incorrect analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Jan 19, 2018
1 parent 07bdbe4 commit 92643be
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/app.js
Expand Up @@ -31,8 +31,6 @@ class App extends Component {
handleRoute = e => {
// ignore repeated routes (eg, when editing fields)
if (!e.previous || e.url.split('?')[0]!==e.previous.split('?')[0]) {
this.track(e);

// a11y fix
clearTimeout(this.timer);
this.timer = setTimeout( () => {
Expand All @@ -44,6 +42,8 @@ class App extends Component {
document.title = h1.textContent + config.appTitleSuffix;
}
this.h1 = h1;

this.track(e);
}, 250);
}
};
Expand Down Expand Up @@ -72,9 +72,6 @@ class App extends Component {
{ typeof document==='undefined' && model.getAllLicensesSync && (
<script dangerouslySetInnerHTML={{ __html: `window.ALL_LICENSES=${JSON.stringify(model.getAllLicensesSync())}` }} />
) }

<script>{`dataLayer=[['js',new Date()],['config','${config.gaTrackingId}']];function gtag(){dataLayer.push(arguments)}`}</script>
<script async src="//www.googletagmanager.com/gtag/js?id=UA-6031694-25" />
</div>
);
}
Expand Down

0 comments on commit 92643be

Please sign in to comment.