Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

5.0.0-beta.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@MatteoGabriele MatteoGabriele released this 20 Aug 18:25
· 254 commits to master since this release

Features

  • fields: this property add direct access to the options sent to create the trackers.
    Vue.use(VueAnalytics, {
       id: 'UA-223232323',
       fields: {
         userId: '123456',
         name: 'my-tracker'
       }
    })
  • untracked: the analytics script takes always a little bit more to load and sometimes you can fire an event before it's ready. Now all event fired before are stored and fired later on when google analytics is finally injected in the window object.

Breaking changes

  • user explorer: the userId is not longer editable in the root of the configuration object, because now is easy accessible within the fields object

    Vue.use(VueAnalytics, {
       id: 'UA-223232323',
       fields: {
         userId: '123456'
       }
    })
  • onReady: the callback name in the plugin options is not more onReady but just ready

  • onAnalyticsReady: since the untracked feature, mounting your app after analytics is ready is not longer needed, but you still can use it.

     import { onAnalyticsReady } from 'vue-analytics'
    
     const App = new Vue({ ... })
    
     onAnalyticsReady().then(() => {
        App.$mount('#app')
      })

    the VueAnalytics instance doesn't have the onScriptLoaded method anymore