Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RHOAIENG-8414] Tracking of dashboard version in Segment. #2896

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
}`,
);
} else if (window.analytics) {
window.analytics.track(eventType, { ...properties, clusterID });
window.analytics.track(

Check warning on line 18 in frontend/src/utilities/segmentIOUtils.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/segmentIOUtils.tsx#L18

Added line #L18 was not covered by tests
eventType,
{ ...properties, clusterID },
{
app: {
version: INTERNAL_DASHBOARD_VERSION,
},
},
);
}
};

Expand All @@ -39,10 +47,26 @@
window.analytics.identify(properties?.anonymousID, { clusterID });
break;
case 'page':
window.analytics.page(undefined, { clusterID });
window.analytics.page(

Check warning on line 50 in frontend/src/utilities/segmentIOUtils.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/segmentIOUtils.tsx#L50

Added line #L50 was not covered by tests
undefined,
{ clusterID },
{
app: {
version: INTERNAL_DASHBOARD_VERSION,
},
},
);
break;
default:
window.analytics.track(eventType, { ...properties, clusterID });
window.analytics.track(

Check warning on line 61 in frontend/src/utilities/segmentIOUtils.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/segmentIOUtils.tsx#L61

Added line #L61 was not covered by tests
eventType,
{ ...properties, clusterID },
{
app: {
version: INTERNAL_DASHBOARD_VERSION,
},
},
);
}
}
};
Expand Down
Loading