Skip to content

Commit

Permalink
Merge pull request #2896 from pilhuhn/track-db-version
Browse files Browse the repository at this point in the history
[RHOAIENG-8414] Tracking of dashboard version in Segment.
  • Loading branch information
openshift-merge-bot[bot] authored Jul 3, 2024
2 parents bd03740 + 0a80377 commit 94f83ad
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions frontend/src/utilities/segmentIOUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ export const fireTrackingEventRaw = (eventType: string, properties?: any): void
}`,
);
} else if (window.analytics) {
window.analytics.track(eventType, { ...properties, clusterID });
window.analytics.track(
eventType,
{ ...properties, clusterID },
{
app: {
version: INTERNAL_DASHBOARD_VERSION,
},
},
);
}
};

Expand All @@ -39,10 +47,26 @@ export const fireTrackingEvent = (
window.analytics.identify(properties?.anonymousID, { clusterID });
break;
case 'page':
window.analytics.page(undefined, { clusterID });
window.analytics.page(
undefined,
{ clusterID },
{
app: {
version: INTERNAL_DASHBOARD_VERSION,
},
},
);
break;
default:
window.analytics.track(eventType, { ...properties, clusterID });
window.analytics.track(
eventType,
{ ...properties, clusterID },
{
app: {
version: INTERNAL_DASHBOARD_VERSION,
},
},
);
}
}
};
Expand Down

0 comments on commit 94f83ad

Please sign in to comment.