ansidev / swetrix-vue

Swetrix Tracking integration for Vue v3
https://swetrix-vue.netlify.app/?utm_source=github&utm_medium=repository
MIT License
1 stars 1 forks source link

Swetrix v3 migration #104

Open Blaumaus opened 5 months ago

Blaumaus commented 5 months ago

First of all, thanks a lot for still supporting this library!

We have released a new version of our tracking script which now includes error tracking, would it be possible to bump the Swetrix version in this library?

For error tracking, I was thinking maybe a hook could be added, something like

export const useSwetrixErrors = (pid: string, initOptions: LibOptions = {}, errorOptions: ErrorOptions = {}) => {
  watchEffect(() => {
    Swetrix.init(pid, initOptions)
    Swetrix.trackErrors(errorOptions)
  })
}

But maybe there's a better way, what do you think? I can also open a PR for this just in case.

ansidev commented 5 months ago

Please submit a PR! 🥺