ScreamZ / vue-analytics

Google Universal Analytics support in Vue.js
Apache License 2.0
216 stars 27 forks source link

Only works for Applications #13

Open karalan opened 7 years ago

karalan commented 7 years ago

Could the readme be made clearer that this only supports applications, or alternatively a change be made to support website sends (pageviews) as well as application sends (screenviews)?

ScreamZ commented 7 years ago

Hey, thanks for the feedback.

What's the issue using screenviews ? VueJS aim for SPA and in my opinion it's the correct behavior, isn't ? Are you trying to make a mix of both screenviews and pageview in your website ?

If you really need it I can add a configuration parameter that allow to send whether pageview instead of screenviews ?

Regards

karalan commented 7 years ago

I do actually think the behaviour is correct as you say, for an SPA and it is the aim of VueJS.

I have the scenario of having both a website and apps as entry points, so the properties at the GA end have been set up as a website and mobile apps respectively at the point each property was created, which in turn affects the collection information and reporting dashboard. If I delete the property and recreate it as a mobile app then I'm not sure how it'd handle information on browsers etc as it would be expecting mobile devices.

A configuration parameter probably would solve the issue, but like you say isn't really in the spirit of VueJS. It does seem as though GA doesn't really handle SPA sites so well.

timothynott commented 7 years ago

I'm running into the same issue. I don't want to call my SPA a mobile app in GA. I guess I could simple wrap the GA calls and be done with it...

https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications

rockmandash commented 3 years ago

Using ScreenView as default instead of PageView is super weird unless you are using this package with an hybrid APP.