Added analytics more functionality