Skip to content

Commit

Permalink
Merge pull request #137 from transitmatters/gc2
Browse files Browse the repository at this point in the history
debug goatcounter loading
  • Loading branch information
austinjpaul authored Jan 24, 2022
2 parents 938be47 + 40630ce commit c4f4fde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script>
window.goatcounter = { no_onload: true };
</script>
<script data-goatcounter="https://transitmatters-dd.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
<script data-goatcounter="https://transitmatters-dd.goatcounter.com/count" src="//gc.zgo.at/count.js"></script>
</head>

<body>
Expand Down
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class App extends React.Component {
};

if (window.location.hostname === PRODUCTION) {
window.goatcounter.count({
window.goatcounter?.count?.({
path: props.location.pathname,
});
}
Expand Down Expand Up @@ -334,7 +334,7 @@ class App extends React.Component {
}

if (window.location.hostname === PRODUCTION) {
window.goatcounter.count({
window.goatcounter?.count?.({
path: window.location.pathname + window.location.search,
});
}
Expand Down

0 comments on commit c4f4fde

Please sign in to comment.