Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"URL contains" match not working as expected. #306

Open
shindakun opened this issue Aug 13, 2018 · 1 comment
Open

"URL contains" match not working as expected. #306

shindakun opened this issue Aug 13, 2018 · 1 comment
Assignees

Comments

@shindakun
Copy link
Member

screen shot 2018-08-13 at 9 58 22 am

Issue: Currently, if you use "URL contains" and the URL contains a partial query parameter value no match will occur. In this example, the URL to match on contains 26585 this is part of a partial match as this is only the start of UTM Content code. Examples 26585AYNC, 26585ABCD, etc.

Example reproduction of issue using an internal test account - 2709 (campaign named "URL contains"):

  1. Create and publish a call to action campaign with a "show on" rule of URL contains using superb-stick.glitch.me/campaign.html?utm_source=facebook&utm_content=26585
  2. In an incognito window visit https://superb-stick.glitch.me/campaign.html?utm_source=facebook&utm_content=26585ABCD and note that no modal is shown.
  3. In an incognito window visit http://superb-stick.glitch.me/campaign.html?utm_source=facebook&utm_content=26585 and note that the modal shows.
@ashyablok ashyablok self-assigned this Oct 8, 2018
@ashyablok
Copy link
Contributor

It appears to be intentionally designed that way to match query params exactly for all methods: https://github.com/lytics/pathforajs/blob/develop/src/rollup/display-conditions/url-contains/phrase-checker.js#L69-L72
https://github.com/lytics/pathforajs/blob/develop/src/rollup/display-conditions/url-contains/compare-queries.js#L25
(Though we allow them in any order). I am unsure what the use case is for this, seems like something regex could solve for? @markhayden any thoughts? Otherwise perhaps lets just update the documentation to note how we handle query params.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants