Google Analytics filter to remove .html from landing page urls | Community
Skip to main content
danb52321225
Level 2
Dec 11, 2019 2:30 AM UTC
Question

Google Analytics filter to remove .html from landing page urls

This article is pretty useless and already confirms what we already know. However, I am looking for an actual solution in our google analytics to search/replace landing page urls that end with .html to without for consistency. Some people remember to remove the .html and others do not. As a result we are getting duplicate line items one ending in .html and one without, which skews the data. 

Issue Description
Is it possible to remove the .html from landing page URLs?

 

Issue Resolution
Yes, the URLs will work without the ".html" suffix.

^ Not sure how that is a resolution, but I am looking to see if others have a real Google Analytics resolution for this issue. 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

danb52321225
Level 2
Dec 11, 2019 8:03 PM UTC

Wow, Sanford you are a lifesaver! this worked! 

Translate
SanfordWhiteman
Level 10
Dec 11, 2019 8:16 PM UTC

Awesome! Maybe worth a short blog post. Mark it as Correct?

Translate
SanfordWhiteman
Level 10
Dec 11, 2019 3:37 AM UTC

Search

  \.html(\?|$)‍

Replace

  \1‍

Test thoroughly (use the "verify" feature).

Note GA regexen are not properly anchored to URL components (host, path, query) and I find they cannot perform most tasks without some risk of false positives.

Translate