4lejandrito / next-plausible

Simple integration for https://nextjs.org and https://plausible.io analytics
https://next-plausible.vercel.app
MIT License
603 stars 33 forks source link

Tracking custom pageviews for aggregate pages that contain identifiers. #119

Open shahbazshueb opened 8 months ago

shahbazshueb commented 8 months ago

I need to track custom pageviews for certain pages that contains identifiers for eg. routes like /product/1 and /product/2 should be tracked as /product/id.

After reading this doc, I tried the following plausible('pageview, {u: '${window.origin}/product/id})} but this does not get tracked with the new url.

This does work when I enable manualPageviews in PlausibleProvider but it also disable automatic pageview which is not what I want to do.

Is there any way to do this?