mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 23:59:01 +02:00
e832c9ed70
GitOrigin-RevId: dd9ab4bb12e8b9071b2a869e2d452945b49d9cd7
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
|
|
})
|
|
}
|