Skip to content

Commit b0a2ec4

Browse files
committed
web engage track user
1 parent ef868c5 commit b0a2ec4

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/pods/application/route.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import config from 'hackerblocks/config/environment'
88
export default Route.extend(ApplicationRouteMixin, UTMCookieRouteMixin, {
99
session: service(),
1010
currentUser: service(),
11+
webengage: service(),
1112
queryParams: {
1213
code: {
1314
refreshModel: true
@@ -57,7 +58,8 @@ export default Route.extend(ApplicationRouteMixin, UTMCookieRouteMixin, {
5758

5859
async model () {
5960
if (this.get('session.isAuthenticated')) {
60-
return this.currentUser.load()
61+
await this.currentUser.load()
62+
return this.webengage.trackUser(this.currentUser.user)
6163
}
6264
},
6365

app/pods/login/route.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export default class LoginRoute extends Route {
1313

1414
afterModel() {
1515
if(this.session.isAuthenticated){
16-
this.webengage.trackUser(this.store.state.session.user)
1716
this.transitionTo('index')
1817
} else {
1918
window.location.href = this.loginUrl

0 commit comments

Comments
 (0)