attempt at adding analytics