mirror of
https://github.com/chinchang/web-maker.git
synced 2025-03-20 10:39:45 +01:00
add custom event tracking for chrome extension
This commit is contained in:
parent
e5220a6b95
commit
780cf21d76
@ -10,6 +10,12 @@ export function trackEvent(category, action, label, value) {
|
||||
}
|
||||
if (window.ga) {
|
||||
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 })
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user