mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-16 03:26:19 +02:00
add custom event tracking for chrome extension
This commit is contained in:
@ -10,6 +10,12 @@ export function trackEvent(category, action, label, value) {
|
|||||||
}
|
}
|
||||||
if (window.ga) {
|
if (window.ga) {
|
||||||
ga('send', 'event', category, action, label, value);
|
ga('send', 'event', category, action, label, value);
|
||||||
|
|
||||||
|
fetch('https://event-ajhkrtmkaq-uc.a.run.app', {
|
||||||
|
method: 'post',
|
||||||
|
headers: { 'Content-Type': 'application/json' },
|
||||||
|
body: JSON.stringify({ category, action, label, value })
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user