Update telemetry.ts

pull/2917/head
zomars 2022-06-06 15:33:13 -06:00
parent 875e279def
commit 51b86b1d97
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ export function collectPageParameters(
}
const reportUsage: EventHandler = async (event, { fetch }) => {
if (event.eventType === "booking") {
const ets = telemetryEventTypes;
if ([ets.bookingConfirmed, ets.embedBookingConfirmed].includes(event.eventType)) {
const key = process.env.CALCOM_LICENSE_KEY;
const url = `${CONSOLE_URL}/api/deployments/usage?key=${key}&quantity=1`;
try {