Skip to content

Commit

Permalink
GoSquared now auto-tags visitors on the back-end
Browse files Browse the repository at this point in the history
  • Loading branch information
simontabor committed May 28, 2015
1 parent 73effbb commit 89d8daa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
6 changes: 0 additions & 6 deletions lib/gosquared/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,6 @@ GoSquared.prototype.identify = function(identify){
} else {
push('properties', props);
}

var email = identify.email();
var username = identify.username();

var name = email || username || id;
if (name) push('set', 'visitorName', name);
};

/**
Expand Down
13 changes: 0 additions & 13 deletions lib/gosquared/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,19 +223,6 @@ describe('GoSquared', function(){
}
});
});

it('should prefer an email for visitor name', function(){
analytics.identify('id', {
email: 'email@example.com',
username: 'username'
});
analytics.called(window._gs, 'set', 'visitorName', 'email@example.com');
});

it('should also prefer a username for visitor name', function(){
analytics.identify('id', { username: 'username' });
analytics.called(window._gs, 'set', 'visitorName', 'username');
});
});

describe('#track', function(){
Expand Down

0 comments on commit 89d8daa

Please sign in to comment.