Skip to main content
Contributor ⭐️⭐️⭐️
July 16, 2019

GPX support for regular expressions?

  • July 16, 2019
  • 19 replies
  • 368 views
Hi,

Does GPX support regular expressions beyond a single * at the end of a URL?

Thanks,

Chad

    19 replies

    harshibanka
    Gainsight Employee ⭐️⭐️
    July 16, 2019
    Hey Chad, could you share an example?

    Harshi (pronounced like the Hershey's chocolate); PLG and Digital CS Evangelist
    caudetAuthor
    Contributor ⭐️⭐️⭐️
    July 16, 2019
    Hi Harshita,

    We want to trigger a dialog engagement for visits to:

    http://domain.com/meetings/ABC123

    But exclude:

    /meetings/live

    /meetings/recap

    /meetings/ABC123/edit

    We started with /meetings/* in the include list.

    When we add these in the exclude list, they are successfully excluded:

    /meetings/live

    /meetings/recap

    But when this is in the exclude list, it is still triggering the engagement:

    /meetings/ABC123/edit

    So I tried adding this to the exclude list, with no effect

    /meetings/[A-Z0-9]+/edit

    And then tried using /meetings/[A-Z0-9]+/ in the include list instead of /meetings/* with no effect.

    Before continuing to try other options, I thought I'd see what the community already knows about what is/not supported.

    Thanks!

    caudetAuthor
    Contributor ⭐️⭐️⭐️
    July 16, 2019
    By the way, we can't use Product Mapper rules to set the Audience because some of these pages do not have unique CSS elements to map to a feature (don't ask me, I didn't build it). Which is why I'm playing around with the URLs.

    -Chad

    alb
    Contributor ⭐️⭐️⭐️⭐️
    July 17, 2019
    Ran into a similar need today, but within the Product Feature Tree.

    We have a main page that has the form:

    https://domain.com/*/mainpage/[guid]

    Sub-pages have the form:

    https://domain.com/*/mainpage/[guid]/subpage/

    The problem is I can't isolate tracking page views to the main page. If I use "...mainpage/" then it won't pick up any because of the GUID. If I use "...mainpage/*" then it will pick up all of the sub-pages.

    Thoughts on how to solve for this?

    harshibanka
    Gainsight Employee ⭐️⭐️
    July 17, 2019
    @caudet I just tested out your Prod engagements and it trigger only while I was on 'recap' page and it did not trigger on /live or /schedule or /abc/edit.

    To me it seems to be working, happy to jump on a call to address this, if needed

    fyi: @dileepnalla @michael_sweeney

    Harshi (pronounced like the Hershey's chocolate); PLG and Digital CS Evangelist
    harshibanka
    Gainsight Employee ⭐️⭐️
    July 17, 2019
    Hey @alb , for product mapper, this is an upcoming feature which is on the roadmap, eta in few weeks

    cc: @mickey / @ciarapeter

    Harshi (pronounced like the Hershey's chocolate); PLG and Digital CS Evangelist
    caudetAuthor
    Contributor ⭐️⭐️⭐️
    July 17, 2019
    Thanks for following up @harshibanka. The reason it appeared to be fixed is that we replaced the original dialog with a tooltip, and triggered the tooltip with a static UI element that appears on /meetings/ABC123 but not /meetings/ABC123/edit. So we didn't solve the problem with the dialog, but we did get around it for the moment.

    And I didn't really expect my regex attempt to work. For [A-Z0-9]+ to work as expected, GPX would also need to interpret the forward slashes "/" in the URL, which would not work because I did not escape those characters. When I have a moment I'll try a correctly formatted URL with escaped chars and see what happens.

    harshibanka
    Gainsight Employee ⭐️⭐️
    July 17, 2019
    @caudet I'd love to follow up on a call with you to understand this better, I'll send few times, thanks

    Harshi (pronounced like the Hershey's chocolate); PLG and Digital CS Evangelist
    caudetAuthor
    Contributor ⭐️⭐️⭐️
    July 22, 2019
    Follow up to my previous comments.

    This is now working to capture the /meetings/ABC123/edit urls we need to exclude:

    /meetings/*/edit

    I swear this was not previously working, with two people trying it separately and a third looking over a shoulder. That said, Harshita confirmed it works, as did I this time around. We'll just call it user error x3 and move on. ;)

    -Chad

    harshibanka
    Gainsight Employee ⭐️⭐️
    July 22, 2019
    @caudet thanks for confirming and closing the loop on this thread.

    Yes, we do support Java regex.

    Harshi (pronounced like the Hershey's chocolate); PLG and Digital CS Evangelist