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 doubts. We will look into the implications of a trailing slash and a wildcard in a URL.
Trailing Slash Condition in VWO
Fundamentally in VWO, for a successful visit or conversion to be tracked, the trailing slash in a URL should always be followed by something, other than just a query parameter.
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.
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>.
The following table explains the matches for the criterion with examples:
Criterion | Example URL | Matching Status | Reason |
*knowledge/* |
https://vwo.com/knowledge/xyz.html | Successful | The slash after 'knowledge' is followed by a valid string. |
https://vwo.com/knowledge/xyz.html?abc=1 | Successful | The slash after 'knowledge' is followed by a valid string and a query parameter. | |
https://vwo.com/knowledge/ | Unsuccessful | The slash after 'knowledge' is not followed by anything. | |
https://vwo.com/knowledge/?abc=1 | Unsuccessful | The slash after 'knowledge' is just followed by a query parameter. |
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>.
The following table explains the matches for the criterion with examples:
Criterion | Example URL | Matching Status | Reason |
knowledge/ | https://vwo.com/knowledge/xyz.html | Successful | ‘knowledge/’ is preceded and succeeded by valid strings. |
https://vwo.com/knowledge/xyz.html?abc=1 | Successful | ‘knowledge/’ is preceded by a valid string and succeeded by a valid string along with a query parameter. | |
https://vwo.com/knowledge/ | Unsuccessful | ‘knowledge/’ is preceded by a valid string but succeeded by nothing. | |
https://vwo.com/knowledge/?abc=1 | Unsuccessful | ‘knowledge/’ is preceded by a valid string but just succeeded by a query parameter. |
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>.
The following table explains the matches for the criterion with examples:
Criterion | Example URL | Matching Status | Reason |
https://www.vwo.com/knowledge/ | https://vwo.com/knowledge/xyz.html | Successful | The specified URL pattern is followed by a valid string. |
https://vwo.com/knowledge/xyz.html?abc=1 | Successful | The specified URL pattern is followed by a valid string along with a query parameter. | |
https://vwo.com/knowledge/ | Unsuccessful | The specified URL pattern is followed by nothing. | |
https://vwo.com/knowledge/?abc=1 | Unsuccessful | The specified URL pattern is just followed by a query parameter. |
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.