Oftentimes in a test campaign, you would have encountered scenarios where you ended up obtaining skewed results with the visit/goal conversion for the intended page not tracked, leaving you clueless. The reason could be too unnoticeable sometimes, such as the existence of a slash (/) at the end of the URL - a.k.a. trailing slash. Well, this article helps you clear up those clouds of doubt. We will look into the implications of a trailing slash and a wildcard in a URL.
Trailing Slash Condition in VWO
Fundamentally in VWO, if you specify the URL pattern involving a trailing slash, then only those URLs that include the trailing slash will be matched for a successful visit or conversion to be tracked.
This condition affects the following URL specification options:
URL matches pattern
While using the URL matches pattern option, you are asked to provide a pattern that involves a wildcard. You can also involve a slash in it. But, here’s where you need to be careful, as the involvement of the trailing slash in the specified URL in VWO mandates the presence of the same in the actual URL.
For example, if you specify the criterion as *knowledge/*, the system will look into all the pages with the URL patterns that include <string>knowledge/<string>. It will not accept the URL patterns that are devoid of the trailing slash.
The following table explains the matches for the criterion with examples:
Criterion | Example URL | Matching Status |
*knowledge/*
|
https://vwo.com/knowledge/xyz.html | Successful |
https://vwo.com/knowledge/xyz.html?abc=1 | Successful | |
https://vwo.com/knowledge/ | Successful | |
https://vwo.com/knowledge/?abc=1 | Successful | |
https://vwo.com/knowledge | Unsuccessful | |
https://vwo.com/knowledge?param=abc | Unsuccessful |
URL contains
While using the URL contains option, you are asked to provide a string that can also involve a slash in it.
For example, if you specify the criterion as knowledge/, in the back-end, the system translates this criterion to *knowledge/* for this URL setting. Therefore, the system will look into all the pages with URL patterns that include <string>knowledge/<string>. It will not accept the patterns that do not contain the slash after “knowledge”.
The following table explains the matches for the criterion with examples:
Criterion | Example URL | Matching Status |
knowledge/ |
https://vwo.com/knowledge/xyz.html | Successful |
https://vwo.com/knowledge/xyz.html?abc=1 | Successful | |
https://vwo.com/knowledge/ | Successful | |
https://vwo.com/knowledge/?abc=1 | Successful | |
https://vwo.com/knowledge | Unsuccessful | |
https://vwo.com/knowledge?#hTmiy | Unsuccessful |
URL starts with
While using the URL starts with option, you are asked to provide a string that can also involve a slash in it.
For example, if you provide the pattern as https://www.vwo.com/knowledge/, in the back-end, the system translates this criterion to https://vwo.com/knowledge/* for this URL setting. Therefore, the system will look into all the pages with URL patterns that include https://vwo.com/knowledge/<string>. However, the URLs that do not have the slash after “knowledge” will not match.
The following table explains the matches for the criterion with examples:
Criterion | Example URL | Matching Status |
https://www.vwo.com/knowledge/ |
https://vwo.com/knowledge/xyz.html | Successful |
https://vwo.com/knowledge/xyz.html?abc=1 | Successful | |
https://vwo.com/knowledge/ | Successful | |
https://vwo.com/knowledge/?abc=1 | Successful | |
https://vwo.com/knowledge | Unsuccessful | |
https://vwo.com/knowledge?abc=1 | Unsuccessful |
Resolution
Overall, it is advised that you understand the impact of a trailing slash and use it appropriately with the above-mentioned URL specification options only when needed. Otherwise, you can just skip specifying the trailing slash altogether.