fixing analytics plugin to work with v2 beta