if (request.getHeader("User-Agent") != null) {
clickstream.setUserAgent(request.getHeader("User-Agent"));
} else {
clickstream.setUserAgent("");
}
BrowserSniffer bs = new BrowserSniffer(request.getHeader("User-Agent"));
session.setAttribute("browserSniffer", bs);
clickstream.setBrowserName(bs.getBrowserName());
clickstream.setOperatingSystem(bs.getOS());
clickstream.setBrowserVersion(bs.getBrowserVersion());
clickstream.setMobileDevice(bs.isMobile());
clickstream.setBot(BotChecker.isBot(request));
clickstream.setFirstPageId(associatedIdentifier);
clickstream.setHostId(host.getIdentifier());
}