*

*

0/500

URL Rule

1. Matching Rule 

Ptengine supports five kinds of URL Rules when setting up page, page group, and conversion settings: for you: include, head match, end match, exact match, regex.

Include means that any URL containing your chosen specified string will be included as part of the Group. For example, if you specify “abc.com” in the Include URL rule, then “abc.com.contact” and other similar URLs will fall under this rule.

Head Match creates a rule for all URLs that contain an exact match to the URL you specify from the first character to the last character you specify, though they may also contain additional data as well.
For example, one registered user’s unique ID is “http://www.example.com/checkout.cgi?page=1&id=9982251615″. The rest of the URL excluding the user’s unique ID contains site content you’d like to monitor. You’d also like to monitor the same pages while another registered user is logged in. Use “http://www.example.com/checkout.cgi?page=1″ as the target website, and select “Head Match” as the URL rule.

End Match creates a rule for all URLs that contain a match from the last character in the URL to the first character in your specified URL. Say you wanted to monitor all the pages accessed by a registered user of your site. In the example above, “http://www.example.com/checkout.cgi?page=1&id=9982251615″ you would specify “&id=9982251615″ and select “End Match.”

Exact match establishes a rule for a one-to-one match with the specified URL.

A Regex, also known as a regular expression, uses special characters to establish flexible matches or wildcard matching. This is useful when the URLs for the same page may have a varying stem, trailing parameters, or both.Regex rule parameters include: Wildcard, Locator, Grouping, Other.

 

2. Common usage of wildcards

Wildcards can be used to replace one or more real characters to create a match for all instances that may vary according to the parameters you specify. Below are some frequently used wildcard statements.

 

Locators create a match based on a fixed point, usually at the beginning or end of a field.

 

Grouping

Note: Regular expressions should be as simple as possible, to ensure ease of use and understanding for you and your colleagues in analyzing your data.

 

3. Common usage of regular expressions

1. The front domain name exactly matches the tail with / or with? Add parameters

Regular: ^ https: \ / \ / www.ptmind.com ($ | \ / $ | \ / \?. *)

Can match the following pages:
https://www.ptmind.com
https://www.ptmind.com/
https://www.ptmind.com/?WT.mc_id=xxxx

Can not match the following page:
https://www.ptmind.com/abc
2. Header match http or https protocol, and match multiple subdomains

Regular: ^ (http | https): \ / \ / (sh | bj | tj) .ptmind.com

Matches the following page:
http://sh.ptmind.com
http://bj.ptmind.com/abc
http://tj.ptmind.com
https://sh.ptmind.com
https://bj.ptmind.com/?WT.mc_id=xxxx
https://tj.ptmind.com

Can not match the following page:
https://www.ptmind.com

 

3. Specify the header matching rules

Regular: ^ http: \ / \ / ptmind \ .com \ / price. * $

Matches the following page:
http://ptmind.com/price/page
http://ptmind.com/price?sid=23fwe3r2&vid=345666
http://ptmind.com/price#top
http://ptmind.com/price

 

4. Matching http or https at the beginning of the link, but also does not match www or replace www with other alphanumeric sub-domain name combination

Regular: ^ (http | https): \ / \ / [a-z0-9] * [.] * Ptmind.com \ / service \ / mng_units \ / lp03 $

Matches the following page:
http://www.ptmind.com/service/mng_units/lp03
https://www.ptmind.com/service/mng_units/lp03
http://ptmind.com/service/mng_units/lp03
http://a123.ptmind.com/service/mng_units/lp03
https://ptmind.com/service/mng_units/lp03

 

5. Matching the end of the data must be between (6984604 to 6984783)

Regular: ^ http: \ / \ / ptmind.com \ / detail \ / id = 6984 ([6] [1-9] [0-9] | [6] [0] [4-9] | [7] [0-7] [0-9] | [7] [8] [0-3]) $

Matches the following page:
http://ptmind.com/detail/id=6984604
http://ptmind.com/detail/id=6984783

Can not match the following page:
http://ptmind.com/detail/id=6984784
http://ptmind.com/detail/id=6984603
4. Regex checking tool 

https://www.regexpal.com/