Subsites

Release 1.3 - ...

Smi 2.0 has the ability to use subsites for a single Smartsite website. It allows you to create two or more Smi databases for a single Smartsite site and split the visitors based on a filter that is defined in the Smartsite.ManagementInformation.config. By using the filter, you can e.g. send all the pageviews on one url to the first Smi database and all the pageviews on the second url to another Smi database. This allows you to create completely separated Smi reports for different departments. Creating subsites is also a good way to solve performance problems if you have two or more very large sites in a single Smartsite instance. By splitting the pageviews over two Smi databases, you can improve the performance of the Smi reports. Note that if you have two sites collecting data, the must both have the type collect or collectandreport.

Filtering

Note: Filtering has been improved a lot in 1.3b3 compared to 1.3b1 so in this article we'll use the 1.3b3 filtering features.

Filtering can be done using an include filter and/or exclude filter. If you have specified only an include filter, only those page requests that match the include filter are sent to the Smi site. If you have specified only an exclude filter, only those page requests that do not match the exclude filter are sent to the Smi site. If you have specified both an include filter and exclude filter, only the page requests that match the include filter and do not match the exclude filter are sent to the Smi site. This means that the exclude filter overrules the include filter.

In the filter configuration you can specify an include filter for both hits and custom events. The first allows you to filter pageviews, the second allows you to filter on custom events stored using the smi.store viper. For hits you can filter page requests based on the channel, client address, content type, item number or code and url or a combination of any of these filters by using the grouping filter.

Example

This example shows you how to send events from http://myfirstsite.com to one Smi database and events from http://mysecondsite.com to another site.

XML CopyCode image Copy Code
<site name="myfirstsite" type="collectandreport">
  <filter>
    <hits>
      <include>
        <url pattern="^http://www.myfirstsite.com[\w\W]*" />
      </include>
    </hits>
  </filter>
</site>
<site name="mysecondsite" type="collectandreport">
  <filter>
    <hits>
      <include>
        <url pattern="^http://www.mysecondsite.com[\w\W]*" />
      </include>
    </hits>
  </filter>
</site>