implemented window for all analytics functions