Class UserMetaData

java.lang.Object
com.loop54.user.UserMetaData

public class UserMetaData extends Object
Represents data about the end-user. Used by the search engine to personalize the shopping experience. Use this class to override the default behaviour of the library. For instance if you want a custom UserId based on a logged in user.
  • Field Details

    • userId

      public String userId
      An unique identifier of the end-user. DO NOT set this to a placeholder string. If it's not set it'll be automatically set to a random GUID when making the request and a cookie will be stored to the IRemoteClientInfo provided in the request so that we may identify the user later.
    • ipAddress

      public String ipAddress
      Ip address of the end-user. If not set it will later be set to the IP address provided by the IRemoteClientInfo.
    • userAgent

      public String userAgent
      User-Agent header from the end-user. If not set it will later be set to the User-Agent provided by the IRemoteClientInfo.
    • referer

      public String referer
      The Referer(sic) header from the end-user. If not set it will later be set to the Referer provided by the IRemoteClientInfo.
    • PROXY_IP_HEADER_NAME

      public static final String PROXY_IP_HEADER_NAME
      See Also:
  • Constructor Details

    • UserMetaData

      public UserMetaData()
    • UserMetaData

      public UserMetaData(String userId)
      The unique id of the user. Could be used for overriding the default, random, cookie-stored identifier.
      Parameters:
      userId - unique identifier of the current end-user. Used to connect behaviour.
  • Method Details