diff --git a/package.json b/package.json index 8383c8c67d..1f26ba1eb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "umami", - "version": "0.92.0", + "version": "0.96.0", "description": "A simple, fast, website analytics alternative to Google Analytics. ", "author": "Mike Cao ", "license": "MIT", diff --git a/tracker/index.js b/tracker/index.js index 3ad8ad3dec..ff0ce28d64 100644 --- a/tracker/index.js +++ b/tracker/index.js @@ -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);