fixes bug 910831 - truncate paths matching a prefix in analytics middleware