Docs search includes UTM codes

I was browsing the docs today and noticed that your Algolia search sometimes comes back with multiple results for the same page (e.g. search for 'environment').

And then I noticed that the URLs for those results are different - some have UTM campaign values in (e.g. https://docs.netlify.com/configure-builds/environment-variables/?utm_campaign=devex&utm_medium=stripe-jamstack-jl&utm_source=blog#app).

At a guess you don’t want this as it’ll be skewing your analytics.

PS Sorry about the random tag, it made me add one.

hey alex, thanks for pointing that out. I will take a closer look and see what is going on here.

Hm. It’s a combined index that includes the blog and marketing pages. I think it must be picking up the docs links in those pages. I’ll see if we can adjust the config for that. Thanks for pointing it out!

Got it fixed up! I also realized we were getting duplicates from urls with/without trailing slashes, so go those fixed, too.

And wow, the results are so much better now. :sweat_smile:

Thanks again!

1 Like