Merge pull request #13765 from strapi/chore/analytics-admin-env

Add environment property to admin telemetry calls
This commit is contained in:
ivanThePleasant 2022-07-14 10:37:38 +03:00 committed by GitHub
commit 2a9f721ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -84,6 +84,9 @@ function App() {
event: 'didInitializeAdministration',
uuid,
deviceId,
properties: {
environment: process.env.NODE_ENV
}
}),
headers: {
'Content-Type': 'application/json',

View File

@ -11,7 +11,7 @@ const useTracking = () => {
try {
axios.post('https://analytics.strapi.io/track', {
event,
properties: { ...properties, projectType: strapi.projectType },
properties: { ...properties, projectType: strapi.projectType, environment: process.env.NODE_ENV },
uuid,
});
} catch (err) {