Skip to content

Commit af5623a

Browse files
author
Marcin Mazurek
committed
[DDW-809] Clean up
1 parent 976d6a0 commit af5623a

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

source/renderer/app/analytics/MatomoClient.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ import { Environment } from '../../../common/types/environment.types';
44
import formatCpuInfo from '../utils/formatCpuInfo';
55
import {
66
ANALYTICS_API_ENDPOINT,
7+
CPU_DIMENSION_KEY,
78
DEV_MODE_SITE_MAP_ID,
89
NETWORK_TO_ANALYTICS_SITE_ID_MAP,
10+
OS_DIMENSION_KEY,
11+
RAM_DIMENSION_KEY,
12+
VERSION_DIMENSION_KEY,
913
} from '../config/analyticsConfig';
1014
import { formattedBytesToSize } from '../utils/formatters';
1115

12-
const CPU_DIMENSION_KEY = 'dimension2';
13-
const RAM_DIMENSION_KEY = 'dimension3';
14-
const OS_DIMENSION_KEY = 'dimension4';
15-
const VERSION_DIMENSION_KEY = 'dimension5';
16-
1716
/**
1817
* Matomo API reference:
1918
* https://developer.matomo.org/api-reference/tracking-api
@@ -56,7 +55,7 @@ export class MatomoClient implements AnalyticsClient {
5655
};
5756

5857
private getAnalyticsURL() {
59-
return 'http://daedalus/' + window.location.hash.replace('#/', '');
58+
return `http://daedalus/${window.location.hash.replace('#/', '')}`;
6059
}
6160

6261
private getMatomoSiteId(environment: Environment) {

source/renderer/app/analytics/TrackedRoute.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function TrackedRoute(props: TrackedRouteProps) {
1616
if (match !== null) {
1717
analytics.sendPageNavigationEvent(pageTitle);
1818
}
19-
}, [window.location.hash, props, pageTitle]);
19+
}, [window.location.hash, props]);
2020

2121
return <Route {...restProps} />;
2222
}

source/renderer/app/config/analyticsConfig.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ export const NETWORK_TO_ANALYTICS_SITE_ID_MAP: Record<Network, number> = {
1515
selfnode: 1,
1616
development: 1,
1717
};
18+
19+
export const CPU_DIMENSION_KEY = 'dimension2';
20+
export const RAM_DIMENSION_KEY = 'dimension3';
21+
export const OS_DIMENSION_KEY = 'dimension4';
22+
export const VERSION_DIMENSION_KEY = 'dimension5';

0 commit comments

Comments
 (0)