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 Sep 8, 2024
1 parent 67d7c65 commit 811d293
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 811d293

Please sign in to comment.