Skip to content

Commit

Permalink
chore: split desktop metrics ids
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Feb 10, 2024
1 parent ba16513 commit 3a10aea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/brackets.config.dist.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"mixPanelID" : "8cb6814f733e37c05cc59b4adad26407",
"coreAnalyticsID" : "phoenix",
"coreAnalyticsAppName" : "phoenix-prod",
"coreAnalyticsAppNameDesktop" : "desktop-prod",
"environment" : "production",
"buildtype" : "production",
"bugsnagEnv" : "production",
Expand Down
1 change: 1 addition & 0 deletions src/brackets.config.staging.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"mixPanelID" : "a7e08ffd43c37767c29b13df1d2e6c62",
"coreAnalyticsID" : "phoenix",
"coreAnalyticsAppName" : "phoenix-stage",
"coreAnalyticsAppNameDesktop" : "desktop-stage",
"environment" : "stage",
"buildtype" : "staging",
"bugsnagEnv" : "staging",
Expand Down
1 change: 1 addition & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"mixPanelID": "49c4d164b592be2350fc7af06a259bf3",
"coreAnalyticsID": "phoenix",
"coreAnalyticsAppName": "phoenix-dev",
"coreAnalyticsAppNameDesktop": "desktop-dev",
"environment": "dev",
"buildtype": "dev",
"bugsnagEnv": "development"
Expand Down
6 changes: 4 additions & 2 deletions src/utils/Metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ define(function (require, exports, module) {
window.analytics.debugMode = window.debugMode;
script.onload = function(){
// replace `your_analytics_account_ID` and `appName` below with your values
window.initAnalyticsSession( brackets.config.coreAnalyticsID,
brackets.config.coreAnalyticsAppName);
const appName = Phoenix.browser.isTauri ?
brackets.config.coreAnalyticsAppNameDesktop:
brackets.config.coreAnalyticsAppName;
window.initAnalyticsSession( brackets.config.coreAnalyticsID, appName);
window.analytics.event("core-analytics", "client-lib", "loadTime", 1,
(new Date().getTime())- window.analytics.loadStartTime);
};
Expand Down

0 comments on commit 3a10aea

Please sign in to comment.