Update segment data

This commit is contained in:
Marcos Lilljedahl
2018-02-15 15:15:14 -03:00
parent 556c841792
commit 81261a0afc
2 changed files with 2 additions and 6 deletions

View File

@@ -90,7 +90,7 @@
url: '/users/me' url: '/users/me'
}).then(function(response) { }).then(function(response) {
[[ if .SegmentId ]] [[ if .SegmentId ]]
analytics.identify(response.data.provider_user_id); analytics.identify(response.data.provider_user_id, {"email": response.data.email});
[[ end ]] [[ end ]]
$scope.user = response.data; $scope.user = response.data;
$scope.loggedIn = true; $scope.loggedIn = true;

View File

@@ -90,11 +90,7 @@
url: '/users/me' url: '/users/me'
}).then(function(response) { }).then(function(response) {
[[ if .SegmentId ]] [[ if .SegmentId ]]
if (response.data.provider == "github") { analytics.identify(response.data.provider_user_id, {"email": response.data.email});
analytics.identify({email: response.data.email, name: response.data.name});
} else if (response.data.provider == "docker") {
analytics.identify(response.data.provider_user_id);
}
[[ end ]] [[ end ]]
$scope.user = response.data; $scope.user = response.data;
$scope.loggedIn = true; $scope.loggedIn = true;