Skip to content

umami is not defined - Tracking Event - Javascript #2437

Closed Answered by jonathan-martz
jonathan-martz asked this question in Q&A
Discussion options

You must be logged in to vote

The Easy solution would be to check if umami is defined.

if (umami) { umami.track((props) => ({ ...props, name: "search", data: { query: $query, }, })); }

because i want to track the search query i checked if query is empty and query is min 3 chars long.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jonathan-martz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant