Skip to content

Commit

Permalink
add user_login tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ety001 committed Feb 8, 2021
1 parent 6ff6675 commit 1302a09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/app/redux/SagaShared.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ function* saveUserPreferences({ payload }) {
}

function* triggeRecordRouteTag({ routeTag, params }) {
console.log('set_route_tag:', routeTag, params);
let trackingId = yield select(state =>
state.app.getIn(['trackingId'], null)
);
yield recordRouteTag(trackingId, routeTag, params);
const [trackingId, username] = yield select(state => [
state.app.getIn(['trackingId'], null),
state.user.getIn(['current', 'username'], null),
]);
yield recordRouteTag(trackingId, routeTag, params, username !== null);
}
3 changes: 2 additions & 1 deletion src/app/utils/ServerApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function serverApiRecordEvent(type, val, rate_limit_ms = 5000) {
// );
}

export function recordRouteTag(trackingId, tag, params) {
export function recordRouteTag(trackingId, tag, params, isLogin = false) {
if (!process.env.BROWSER || window.$STM_ServerBusy) return;
let tags = {
app: 'wallet',
Expand All @@ -61,6 +61,7 @@ export function recordRouteTag(trackingId, tag, params) {
};
break;
}
tags['is_login'] = isLogin;
api.call(
'overseer.collect',
[
Expand Down

0 comments on commit 1302a09

Please sign in to comment.