Allow tracking to specify event types other than 'custom'

A very minimal change to this line
`window.umami = event_value => collect('event', { event_type:
'custom', event_value });`

to include a second value does not break current uses
pull/175/head
Rendall 2020-09-18 13:35:57 +03:00
parent 1cfb9e18a1
commit 649117b1bf
1 changed files with 2 additions and 1 deletions

View File

@ -104,6 +104,7 @@ import { removeTrailingSlash } from '../lib/url';
pageView(); pageView();
if (!window.umami) { if (!window.umami) {
window.umami = event_value => collect('event', { event_type: 'custom', event_value }); window.umami = (event_value, event_type = 'custom') =>
collect('event', { event_type, event_value });
} }
})(window); })(window);