You have an undocumented option for trackView that would let anyone using that method manually track the view as either a page or a screenview. I thought it might be useful to have that option globally available when auto-tracking with vueRouter:
Vue.use(VueAnalytics, {
appName: '<app_name>', // Mandatory
appVersion: '<app_version>', // Mandatory
trackingId: '<your_tracking_id>', // Mandatory
debug: true, // Whether or not display console logs debugs (optional)
vueRouter: router, // Pass the router instance to automatically sync with router (optional)
ignoredViews: ['homepage'], // If router, you can exclude some routes name (case insensitive) (optional)
**trackPage: true|false, // Whether you want page changes to be recorded as pageviews (website) or screenviews (app), default: false**
globalDimensions: [ // Optional
{dimension: 1, value: 'MyDimensionValue'},
{dimension: 2, value: 'AnotherDimensionValue'}
],
globalMetrics: [ // Optional
{metric: 1, value: 'MyMetricValue'},
{metric: 2, value: 'AnotherMetricValue'}
]
})
Setting that option to true will now dispatch a view as a pageview instead. Hope this helps :)
You have an undocumented option for
trackView
that would let anyone using that method manually track the view as either a page or a screenview. I thought it might be useful to have that option globally available when auto-tracking withvueRouter
:Setting that option to true will now dispatch a view as a pageview instead. Hope this helps :)