Each entry in the web server log contains a field that references the URL of the page or file that was accessed. Reporting Server uses this field to track activity on the web site, and counts each unique URL as a separate page or file. Some web server plug-ins or software add unique identifiers to URLs which can cause hits to these pages to be counted incorrectly.
For example, shopping cart software may add a unique string to the page name in order to track visitors and their shopping carts. If this is the case, every hit to such a page appears in the log as a unique URL (containing the ID of the visitor), which would prevent you from getting an accurate hit count for that page.
That’s where URL Search and Replace comes in. This feature allows you to delete specific identifiers from URLs or replace all unique identifiers with a common string. Doing so restores accuracy to page counts, makes your reports more informative, and avoids some out of memory conditions when the number of unique IDs is extremely high.
Once you’ve set up the URLs to look for, you can apply them to all profiles or to the ones that you choose. Keep in mind that the URL replacement is performed before any other processing takes place.
Using URL search and replace for shopping cart software Many web sites that sell products use shopping cart software. If you browse a site where you can purchase products, typically you see buttons that say, "add to basket" or "add to cart." The software used to track the shopping cart uses one of several mechanisms to associate the visitor of the site with her shopping cart. One of the following mechanisms can be used:
• IP address of the visitor
This mechanism uses the IP address of the visitor to track the shopping cart. It is not widely used because many visitors can come from the same IP address. An IP address looks something like this: 192.068.0.196.
• Cookie
This mechanism uses a cookie that is stored on the visitor's computer to track the cart. It can also be used to track the user's shopping interests. Because some users don't allow cookies to be downloaded, software using cookies either rejects the user or switches to one of the other mechanisms.
Some examples of stores that use cookies are SalesCart, IBM and ShopSite.
• Parameters on dynamic pages
Sites using dynamic pages often use a parameter that identifies the visitor and includes this parameter in the URL of every page visited. Each page is a script that uses the shopping cart parameter to access a database. One type of entry might look something like this:
page.pl?cart_id=HJF18851410K&product=boot, where HJF18851410K is the cart id. Yahoo.Store and NetCart are examples of store providers using these parameters. Another type of entry might look like this:
page.pl?hRUD9TPc;00-342;26, where hRUD9TPc is the id.
Mercantec and MiniVend are examples of providers using this type of parameter.
• Data embedded in the URL
Some sites using dynamic pages use server-side data includes to embed shopping cart information. Data embedded in the URL might look like this:
/catalogue/1823749274/Offer/AddProduct/123, where 1823749274 is the shopping cart id.
How tracking mechanisms affect analysis
If the shopping cart software uses the IP or cookie, the analysis is performed in the usual manner. If the software uses a consistent name/value pair parameter (such as
?cart_id=ure445&product=jacket), you can use a URL Parameter Analysis definition (see “Analyzing activity for a dynamic site” on page 130).
If the software doesn't use a name/value parameter pair (and uses something like page.pl?hRUD9TPc;00-342;26), or if the data is embedded (such as /catalogue/1823749274/Offer/AddProduct/
123), you should use a URL Search and Replace definition.
Using URL search and replace to group pages
You can use URL Replacement definitions to analyze and report on URLs differently than they were recorded in the log. You might do this to report on all pages from a certain directory as hits to the same page, forcing the pages into a “group.” Because the URL replacement
is performed before the analysis, the change affects the counting for all tables and graphs.
Grouping pages using this method differs from Content Groups because Content Group definitions only apply to the Content Group section, whereas a URL replacement definition applies to all sections of the report.
To make URL replacement selections
1 Select Configuration>Advanced Features>URL Search and Replace.
The URL Search and Replace tab lists all URL replacment definitions. Checks indicate those that are enabled.
2 Select one of the following options:
• Add--Click this button to create a new definition. See
“Creating a URL replacement definition” on page 126 for details.
• Edit--Select an item, and click Edit to modify the settings.
• Delete--Select an item, and click Delete to remove it.
3 You can apply the definitions to every profile or pick the ones to use for each profile:
• Apply these settings to all profiles--Select this option to apply these definitions to all profiles.
• Allow the user to modify on a profile basis--Select this option to choose the URL replacement definitions on a profile basis.
4 Click OK to close the dialog.
Creating a URL replacement definition
Use these steps to create a new URL replacement definition.
1 Select Configuration>Advanced Features>URL Search and Replace.
2 Click Add, and the Preconfigured URL Search and Replace dialog opens.
3 Select Custom from the Shopping Cart list, and click Continue.
The URL Search and Replace dialog opens.
4 Enter a name for the definition in the Description field.
5 Use the Replace From list to select the starting point for the replacement. Enter the string to match in the next field.
6 Use the Up To list to select the ending point for the replacement from the drop-down list, and enter the text that indicates the end of the replacement string.
7 In the With field, enter the text to use in place of the text you specified in the Replace From field.
8 In the Perform Replacement only if URL Contains field, you specify a value to match. The text is replaced only if the URL contains this value.
9 To use the URL text that was replaced to track user sessions, check the Use the Text That Was Replaced... box. The replaced text is used rather than an IP or cookie.
10 Use the Test Area to see how the definition works. Enter a sample URL, and click the Test button. The results are displayed in the Resulting URL field. The text that was removed is
displayed in the Text that was Replaced field.
11 Click OK to close the URL Search and Replace dialog.