cubicast.identify(userId, [userTraits])
  • Arguments:

    • {string} userId
    • {Object} userTraits
  • Usage:
    By default, the Cubicast recorder will identify your web app or site users as anonymous visitors. If your web app offers a sign in mechanism, then by calling this function you can identify the user of the recorded session.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    
      // identifying a user by a unique ID
    
      cubicast.identify('12056');
      
      // identifying a user by his email
      
      cubicast.identify('johndoe@example.com');
    
      // providing additional user information
    
      cubicast.identify('12056', {
        name: 'John Doe'
      });
    
      cubicast.identify('12056', {
        first_name: 'John',
        last_name: 'Doe'
      });
    
      cubicast.identify('12056', {
        firstName: 'John',
        lastName: 'Doe',
        email: 'johndoe@example.com'
      });