Using Custom FIlters to Rewrite URLs Displayed In GA

Discussion in 'Google Analytics' started by opinionatedfool, Feb 12, 2014.

  1. #1
    Hello,

    I'm trying to create a Google Analytics filter that will rewrite URLs that are displayed in the Google Analytics as the current ones are hard to deal with. A lot of URLs are VERY long. Below is an example of a URL I'm trying to rewrite (I shortened it in the example, real URLs are about 3 times as long).

    http://www.DOMAIN.com/wps/portal/Payments/!ut/p/b1/04_Sj9CPy!!/dl4/d5/L2dBISEvZ/pw/Z7_3OQV0/ren/p=action=paymentinfo/

    I want everything between and including "!ut" and "/ren/"to be removed from all report views. That would make the above URL look like this:

    http://www.DOMAIN.com/wps/portal/Payments/p=action=paymentinfo/

    I'm not the greatest at regex, but I tried a bunch of different expressions and none of them do what I want to do. I can get everything after "!ut" to drop off, but I can't get the piece at the end to remain. I used the custom filter with A/B and tried to merge the two pieces using $A1$B1.

    How should I set up the filters and the Regex to do what I'm trying to do? Any help would be greatly appreciated!
     
    opinionatedfool, Feb 12, 2014 IP