Skip to content

Commit e694675

Browse files
author
Sohee Lee
committed
feat: change GA Tracking ID
1 parent f3d11f3 commit e694675

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/js/request.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ var object = require('./object');
99
var collection = require('./collection');
1010
var type = require('./type');
1111

12+
var trackingIdMap = {
13+
'editor': 'UA-129966929-1',
14+
'grid': 'UA-129951906-1',
15+
'calendar': 'UA-129951699-1',
16+
'chart': 'UA-129983528-1',
17+
'image-editor': 'UA-129999381-1',
18+
'component': 'UA-129987462-1'
19+
};
20+
1221
/**
1322
* Check if the date has passed 7 days
1423
* @param {number} date - milliseconds
@@ -32,7 +41,8 @@ function sendHostname(applicationId) {
3241
var url = 'https://www.google-analytics.com/collect';
3342
var hostname = location.hostname;
3443
var hitType = 'event';
35-
var trackingId = 'UA-115377265-9';
44+
var eventCategory = 'use';
45+
var trackingId = trackingIdMap[applicationId] || trackingIdMap.component;
3646
var applicationKeyForStorage = 'TOAST UI ' + applicationId + ' for ' + hostname + ': Statistics';
3747
var date = window.localStorage.getItem(applicationKeyForStorage);
3848

@@ -56,7 +66,9 @@ function sendHostname(applicationId) {
5666
tid: trackingId,
5767
cid: hostname,
5868
dp: hostname,
59-
dh: applicationId
69+
dh: applicationId,
70+
el: applicationId,
71+
ec: eventCategory
6072
});
6173
}
6274
}, 1000);

0 commit comments

Comments
 (0)