fix(analytics): include username on page_generated events
Memind CI / Test, build, and release guards (pull_request) Successful in 5m34s
Memind CI / Test, build, and release guards (pull_request) Successful in 5m34s
Umami creator labels read event_data.username; server events only sent owner_label, so dashboards fell back to MindSpace UUID path segments. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -60,6 +60,7 @@ export function sendMindSpaceRybbitEvent({
|
||||
const owner = pseudonymizeAnalyticsId(ownerId, config.idSecret);
|
||||
if (!owner) return Promise.resolve(false);
|
||||
const endpoint = `${String(config.rybbitUrl || 'https://rybbit.tkmind.cn').replace(/\/$/, '')}/api/track`;
|
||||
const username = resolveAnalyticsOwnerLabel({ displayName: ownerLabel });
|
||||
const payload = {
|
||||
site_id: String(config.siteId),
|
||||
type: 'custom_event',
|
||||
@@ -76,7 +77,8 @@ export function sendMindSpaceRybbitEvent({
|
||||
agent_run_id: String(agentRunId || ''),
|
||||
channel,
|
||||
owner_segment: String(ownerSegment || 'unknown'),
|
||||
owner_label: resolveAnalyticsOwnerLabel({ displayName: ownerLabel }),
|
||||
username,
|
||||
owner_label: username,
|
||||
}),
|
||||
};
|
||||
return fetch(endpoint, {
|
||||
|
||||
Reference in New Issue
Block a user