Skip to content

Commit

Permalink
fix(tracker): handle pageshow events from bfcache
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanccn committed Mar 18, 2024
1 parent 02d2256 commit 48db26f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tracker/src/plausible.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@
} else {
page()
}

document.addEventListener('pageshow', (ev) => {
if (ev.persisted) page();
})
{{/unless}}

{{#if (any outbound_links file_downloads tagged_events)}}
Expand Down

0 comments on commit 48db26f

Please sign in to comment.