I am trying to set up my Nextjs site to retain query parameters as users navigate my site – specifically utm parameters.
My approach has been to handle this in my middleware.ts file. From the initial URL I save the query parameters that I am interested in to a cookie, and then add query parameters from this cookie to the URL when the site navigates to a different page.
I am noticing that am picking up a uid=xxx query parameter unless I ensure that it is not kept.
I am interested to know what is happening here and whether the way I am handling the URL and query parameters is getting in the way of Prismic.