mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Fix tracker regex for events.
This commit is contained in:
parent
56ccdf8c8e
commit
e0a7fd9ec4
2 changed files with 2 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ import { removeTrailingSlash } from '../lib/url';
|
|||
const addEvents = () => {
|
||||
document.querySelectorAll("[class*='umami--']").forEach(element => {
|
||||
element.className.split(' ').forEach(className => {
|
||||
if (/^umami--([a-z]+)--([a-z0-9_]+[a-z0-9-_]+)$/.test(className)) {
|
||||
if (/^umami--([a-z]+)--([\w]+[\w-]*)$/.test(className)) {
|
||||
const [, type, value] = className.split('--');
|
||||
const listener = () => trackEvent(value, type);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue