mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 11:24:13 -05:00
14 lines
328 B
JavaScript
14 lines
328 B
JavaScript
|
import { postJSON } from './fetch-json'
|
||
|
|
||
|
export function send(category, action, label, value) {
|
||
|
if (typeof window.ga === 'function') {
|
||
|
window.ga('send', 'event', category, action, label, value)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export function sendMB(key, body = {}) {
|
||
|
postJSON(`/event/${key}`, { body }).catch(() => {
|
||
|
// ignore errors
|
||
|
})
|
||
|
}
|