Added optional analytics