Skip to content

Commit 6220cb7

Browse files
authored
Merge pull request #155 from topcoder-platform/notifications-analytics
Moved GA tracking ID to config file
2 parents 1411199 + bdecaa1 commit 6220cb7

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

config/default.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "",
33
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "",
44
"PAGE_SIZE": 50,
5-
"REVIEW_OPPORTUNITY_PAGE_SIZE": 1000
5+
"REVIEW_OPPORTUNITY_PAGE_SIZE": 1000,
6+
"GOOGLE_ANALYTICS_ID": ""
67
}

config/development.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "68c5a381-c8ab-48af-92a7-7a869a4ee6c3",
3-
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "52c91e85-745f-4e62-b592-9879a2dfe9fd"
3+
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "52c91e85-745f-4e62-b592-9879a2dfe9fd",
4+
"GOOGLE_ANALYTICS_ID": "UA-161803421-1"
45
}

config/production.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"AV_SCAN_SCORER_REVIEW_TYPE_ID": "55bbb17d-aac2-45a6-89c3-a8d102863d05",
3-
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "df51ca7d-fb0a-4147-9569-992fcf5aae48"
3+
"PROVISIONAL_SCORING_COMPLETED_REVIEW_TYPE_ID": "df51ca7d-fb0a-4147-9569-992fcf5aae48",
4+
"GOOGLE_ANALYTICS_ID": "UA-6340959-1"
45
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"jest": "jest --no-cache --maxWorkers=4 --config config/jest/default.js",
3131
"lint": "npm run lint:js",
3232
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
33-
"test": "npm run lint && npm run jest"
33+
"test": "npm run lint && npm run jest",
34+
"rimraf": "./node_modules/rimraf/bin.js"
3435
},
3536
"version": "0.16.0",
3637
"dependencies": {

src/utils/tracking.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/* global window */
2+
/* global CONFIG */
23

34
import ReactGA from 'react-ga';
45

6+
const { GOOGLE_ANALYTICS_ID } = CONFIG;
57
const TRACKING_NAME = 'tracking';
68

79
/**
@@ -10,7 +12,7 @@ const TRACKING_NAME = 'tracking';
1012
*/
1113
export const init = (userId) => {
1214
ReactGA.initialize([{
13-
trackingId: 'UA-161803421-1',
15+
trackingId: GOOGLE_ANALYTICS_ID,
1416
gaOptions: {
1517
name: TRACKING_NAME,
1618
userId,

0 commit comments

Comments
 (0)