Our Google Analytics environment was setup with an append hostname to URI filter which would append as follow:
/cincinnatibell.com/ and example would be /cincinnatibell.com/discover
An IT developer overwrote our filter and caused an issue with the appending. All of the pageview URIs were reset to /discover, /plans-and-pricing, etc. Instead of including the domain name
I am trying to restore it. Right now, I followed these instructions to append hostname to URI (https://www.bounteous.com/insights/2015/12/10/basic-google-analytics-filters-every-site/) however, I am now getting /www.cincinnatibell.com/discover
How do I remove the www. from the URI? I tried a Search and Replace to remove the www. from the hostname but that only changed the hostname, it didn't fix it for the URI as well
August Data with append hostname to URI, better but we want it the way July looked
The fix should be fairly easy. You just need to split the hostname into 2 parts, the
www.and thecincinnatibell.comand then only extract the second piece.The
?checks if there is either 0 or 1 instances ofwww., so if you have different versions of the hostname (one with the www, one without), this will match either.The
$A2extracts the second part of the hostname, anything after thewww.(whether it's there or not).You then use this extract to prepend to your
Request URI.