nuxt / scripts

Plug-and-play script optimization for Nuxt applications. (Public Preview)
https://scripts.nuxt.com
MIT License
138 stars 9 forks source link

Add `onRouteChange` to `useTrackingScript` #4

Closed harlan-zw closed 3 months ago

harlan-zw commented 3 months ago

Because Nuxt does not await the Unhead DOM render as part of the page change hooks, the head can be out of sync when the user is pushing events based on the route change.

We should implement a function that does await the head change.