vue-analytics-facebook-pixel
                                
                                 vue-analytics-facebook-pixel copied to clipboard
                                
                                    vue-analytics-facebook-pixel copied to clipboard
                            
                            
                            
                        enhancement request: integrate with vue-router
Similar to vue-analytics, allow passing a router instance as an option:
import router from './router'
import VueFacebookPixel from 'vue-analytics-facebook-pixel'
Vue.use(VueFacebookPixel, { router })
and automatically fire 'PageView' on route change
Sure thing, thanks!
PRs are welcome, if you are interested!
If I get to it before you, for sure. :)
According to Facebook Pixel documentation, all changes in the history state is automatically tracked as a PageView. Perhaps this feature is significant only in the cases when router is used in hash mode.
By default Facebook Pixel activates the HTML 5 History State API listener. This means that each time a new state appears in the history, such as history.pushState, Facebook Pixel fires a PageView event. Note that due to the way we designed Facebook Pixel's JavaScript code, you cannot fire more than one PageView event explicitly without this listener.
@rafapg do you have any opportunity to investigate this?