mirror of
https://github.com/szimek/sharedrop.git
synced 2026-06-16 21:10:54 +08:00
12 lines
304 B
JavaScript
12 lines
304 B
JavaScript
export default {
|
|
hasAnalytics: function () {
|
|
return window.ga && typeof window.ga === "function";
|
|
},
|
|
|
|
trackEvent: function (category, action, label, value) {
|
|
if (this.hasAnalytics()) {
|
|
window.ga('send', 'event', category, action, label, value);
|
|
}
|
|
}
|
|
};
|