Skip to content

Commit

Permalink
docs: Fix site links for adblock users (#1651)
Browse files Browse the repository at this point in the history
Co-authored-by: Anne-Victoria <>
  • Loading branch information
Anne-Victoria committed Aug 3, 2020
1 parent 6321dc8 commit 70551f9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions site/src/plugins/goatcounter-plugin.js
Expand Up @@ -7,9 +7,11 @@ module.exports = function() {
`<script>
if ('history' in window) {
function trackView() {
window.goatcounter.count({
path: location.pathname + location.search,
});
if ('goatcounter' in window) {
window.goatcounter.count({
path: location.pathname + location.search,
});
}
}
// Monkey patch browser pushState
Expand Down

0 comments on commit 70551f9

Please sign in to comment.