Date of slack thread: 6/28/24
Anonymous: Hello team. Is there a way to filter events using regex? I am trying to filter on page_url or value being http://subdomain.domain.com/.*/something
Anonymous: I’m trying to create a dashboard filtering events by a url
Anonymous: Contains doesn’t cover it
Anonymous: We have pages like /sales/free /sales/shopify or /sales. If I want just /sales contains doesn’t work
Anonymous: But I don’t want /sales/free or /sales/shopify
Anonymous: I want only ending in /sales
Cooper Reid (Statsig): At the moment we dont have support for that. I’ve jotted it down as a feature request. Your best bet would be to use the string contains operator on the end of the url (and maybe another on the start of the url if the domains need to match as well?)
Cooper Reid (Statsig): Yeah, I’ve previously used “contains” to cover this, and made a composite metric comprised of multiple events (and their contains filter) to account for the various matches. I do agree Regex operator would be for this, I upvote the feature request!
Cooper Reid (Statsig): If the last branch of the path in your example is a known string, it will
Cooper Reid (Statsig): Wouldn’t it be just
Event: Autocapture::page_view
Filter: page_url contains
/sales
Cooper Reid (Statsig): Ohh I see what you’re saying … ya