diff --git a/frontend/src/api/common/logEvent.ts b/frontend/src/api/common/logEvent.ts index 26c7807bd9..fd09002582 100644 --- a/frontend/src/api/common/logEvent.ts +++ b/frontend/src/api/common/logEvent.ts @@ -11,9 +11,12 @@ const logEvent = async ( rateLimited?: boolean, ): Promise | ErrorResponse> => { try { + // add tenant_url to attributes + const { hostname } = window.location; + const updatedAttributes = { ...attributes, tenant_url: hostname }; const response = await axios.post('/event', { eventName, - attributes, + attributes: updatedAttributes, eventType: eventType || 'track', rateLimited: rateLimited || false, // TODO: Update this once we have a proper way to handle rate limiting });