Zone patterns

Return to Introduction  Previous page  Next page

Defining zone patterns

A pattern is an expression that allows you to describe the location not only of a specific web page, but of a group of web pages with similar URLs. When page URLs differ but slightly, there is no need to enter each URL separately: all you need to do is make up a pattern that will cover the whole page range.

If you are using a predefined set of zones you obtained with the software package, all the zone patterns are already defined. However, if necessary, you can edit these patterns, remove unnecessary patterns or add patterns of your own (this, of course, will change the page ranges of your zones).

URL patterns

No matter whether you are creating a pattern from scratch or just modifying an existing pattern, you should keep in mind that patterns use a special syntax.

The asterisk * is a wildcard character that matches any number of characters, including none. The default pattern *://*/* matches any URL. Any other patterns can be formed on the basis of the default pattern by modifying the portions that matter for identifying a particular URL/set of URLs. For example, the pattern http://*/*?mode=* matches any URL that contains a parameter 'mode' with any value; the pattern http://*msn.com matches any URL whose host name ends in 'msn.com', like http://www.msn.com or http://msn.com.

The dollar sign $ anchors the expression to the end of the target string. When this sign appears as the last character of the pattern expression, Sales-n-Stats “understands” that the end of the URL included into a zone must be the same as the pattern expression. For example, if you set the pattern for a certain zone as http://example/xcart/home.php$, the only page that will be included into this zone will be http://example/xcart/home.php, while the URLs http://example/xcart/home.php?cat=3 or http://example/xcart/home.php?cat=26 will not.

Here are some examples that demonstrate how pattern syntax affects the results:

pattern

matches

doesn't match

http://*/*/cart.php?line_break
target=checkout

http://host/lc/cart.php?mode=line_break
abc&target=checkout

http://host/lc/cart.php

http://msn/*?mode=*

http://msn/lc/cart.php?target=line_break
help&mode=abc

http://msn.com

http://msn/lc/cart.php?line_break
target=help&mode

http://msn/*?mode

http://msn/lc/cart.php?mode

http://msn/lc/cart.php?mode=abc

http://msn/*?mode=*$

http://msn/lc/?mode=abc

http://msn/lc/?target=help&mode=abc

http://*/*/cart.php

http://host/~leo/cart.php?target=product

http://host/cart.php

http://host/acart.php

http://host/cart

http://*/*/shop/*

http://host/~leo/shop

http://host/~kvd/shop/index.html

http://host/shop

https://host/shop

*://*/*

any URL