added analytics wrapper