skip fillter keyword resets for analytics
This commit is contained in:
parent
85a991428e
commit
d4ac27403b
@ -30,12 +30,14 @@ const GalleryPage = ({ data }) => {
|
||||
|
||||
const setKeyword = React.useCallback(
|
||||
(newKeyword) => {
|
||||
try {
|
||||
window.plausible("Filter Keyword", {
|
||||
props: { keyword: newKeyword },
|
||||
});
|
||||
} catch (e) {
|
||||
// do nothing
|
||||
if (newKeyword) {
|
||||
try {
|
||||
window.plausible("Filter Keyword", {
|
||||
props: { keyword: newKeyword },
|
||||
});
|
||||
} catch (e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
_setKeyword(newKeyword);
|
||||
window.history.replaceState(
|
||||
|
Loading…
x
Reference in New Issue
Block a user