@strapi/strapi
Version:
An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite
26 lines (23 loc) • 674 B
JavaScript
import { generateInstallId } from '@strapi/utils';
const sendEvent = async (event, uuid, installId)=>{
try {
await fetch('https://analytics.strapi.io/api/v2/track', {
method: 'POST',
body: JSON.stringify({
event,
deviceId: generateInstallId(uuid, installId),
groupProperties: {
projectId: uuid
}
}),
headers: {
'Content-Type': 'application/json',
'X-Strapi-Event': event
}
});
} catch (e) {
// ...
}
};
export { sendEvent };
//# sourceMappingURL=telemetry.mjs.map