Change analytics depending on provider

This commit is contained in:
marcos
2017-12-01 20:42:31 -03:00
parent efaa37e0ad
commit 7c637205c9
2 changed files with 6 additions and 2 deletions

View File

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

View File

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