mirror of
https://github.com/kremalicious/umami.git
synced 2025-01-05 19:35:43 +01:00
Update className check in tracker.
This commit is contained in:
parent
547eefae82
commit
698d4d2687
@ -114,17 +114,16 @@ import { removeTrailingSlash } from '../lib/url';
|
||||
};
|
||||
|
||||
const addEvent = element => {
|
||||
element.className &&
|
||||
element.className.split(' ').forEach(className => {
|
||||
if (!eventClass.test(className)) return;
|
||||
(element.getAttribute('class') || '').split(' ').forEach(className => {
|
||||
if (!eventClass.test(className)) return;
|
||||
|
||||
const [, type, value] = className.split('--');
|
||||
const listener = listeners[className]
|
||||
? listeners[className]
|
||||
: (listeners[className] = () => trackEvent(value, type));
|
||||
const [, type, value] = className.split('--');
|
||||
const listener = listeners[className]
|
||||
? listeners[className]
|
||||
: (listeners[className] = () => trackEvent(value, type));
|
||||
|
||||
element.addEventListener(type, listener, true);
|
||||
});
|
||||
element.addEventListener(type, listener, true);
|
||||
});
|
||||
};
|
||||
|
||||
const monitorMutate = mutations => {
|
||||
|
Loading…
Reference in New Issue
Block a user