Skip to content

Commit

Permalink
Collect urls in pushstate the same way as in initial load
Browse files Browse the repository at this point in the history
  • Loading branch information
snird committed Aug 22, 2020
1 parent 30c84dd commit 9ac97a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion public/umami.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions tracker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ import { post, hook, doNotTrack } from '../lib/web';

/* Handle history */

const handlePush = (state, title, url) => {
const handlePush = (state, title, navaigatedUrl) => {
removeEvents();
currentRef = currentUrl;
currentUrl = url;
const url = new URL(navaigatedUrl);
currentUrl = `${url.pathname}${url.search}`;
pageView();
};

Expand Down

0 comments on commit 9ac97a3

Please sign in to comment.