mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 10:21:36 +03:00
9 lines
289 B
JavaScript
9 lines
289 B
JavaScript
|
// 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});
|
||
|
}
|