Google Analytics filter to remove .html from landing page urls | Community
Skip to main content
danb52321225
Level 2
December 11, 2019
Question

Google Analytics filter to remove .html from landing page urls

  • December 11, 2019
  • 2 replies
  • 3049 views

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.

2 replies

SanfordWhiteman
Level 10
December 11, 2019

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.

danb52321225
Level 2
December 11, 2019

Wow, Sanford you are a lifesaver! this worked! 

SanfordWhiteman
Level 10
December 11, 2019

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