Target on Visits

New User or Returning User, Sessions, Pageviews and more

ABlyft provides many ways to target visitor behavior. In concrete terms, there is not only the possibility of targeting new visitors or returning visitors, but also work with specific times, etc.
Here you will find some examples that you can easily customize according to your needs.

On this page

The User.visits Object

A JavaScript object User.visits is available in Audience Targeting. This is structured as follows (here with example data).

Advance notice

  1. A Unix timestamp describes the seconds since 01.01.1970 UTC
  2. The terms "Sessions" and "Visits" are to be understood synonymously
   first: 1542899138,  //Unix Timestamp of first Visit
   last: 1542965184,   //Unix Timestamp of last Visit (last Pageview)
   pageviews: 11,      //Number of all Visits
   sessions: 5,        //Number of all Pageviews
   pageviewsSession: 2 //Number of Pageviews of the current Visit


Audience "New Visitor"

return User.visits.sessions == 1;

Audience "Returning Visitor"

return User.visits.sessions > 1;

Audience "Daily Visitor"

if(User.visits.sessions >= 7){
   var daysSinceFirstSession = (User.visits.last-User.visits.first) / (60*60*24);
   var avgSessionsPerDay = User.visits.sessions / daysSinceFirstSession;
   if(avgSessionsPerDay >= 1){
      return true;

Audience "Browsing Visitor"

return User.visits.pageviewsSession >= 10;