Ghost/ghost/admin/app/utils/analytics.js

9 lines
289 B
JavaScript
Raw Normal View History

// Wrapper function for Plausible event
export default function trackEvent(eventName, props = {}) {
window.plausible = window.plausible || function () {
(window.plausible.q = window.plausible.q || []).push(arguments);
};
window.plausible(eventName, {props: props});
}