Open madebyfabian opened 4 months ago
Hey @madebyfabian, I think the easier way is to add manually the tracker in each page you want to track using https://github.com/nuxt-modules/plausible#usetrackpageview
<script setup>
useTrackPageview()
</script>
See usage in the UnJS website: https://github.com/unjs/website/blob/main/pages/index.vue#L21
Do not hesite if you have more question!
Thanks for your answer! I think there is now a native way to do that in the Plausible settings directly: https://plausible.io/docs/top-pages#block-traffic-from-specific-pages-or-sections
Hi there! I wanted to use Plausible in a Nuxt project and exclude some of my routes from being automatically tracked as pageview.
Since this is currently not possible with the plausible-tracker, I thought of setting
autoPageviews: false
and manually tracking them, excluding the paths I don't want to manually.But where would be the best option to do that? In a Nuxt client middleware? Or in a route watcher in
app.vue
? Or maybe thepage:finish
hook? From the implementation of this nuxt module, it wasn't super clear for me on how to do it.Appreciate your input!