Enable URL filtering for Web Analytics (SharePoint Server 2010)

 

Applies to: SharePoint Server 2010

This article describes how to use URL filtering in Web Analytics for Microsoft SharePoint Server 2010. This functionality is enabled in the hotfix addressed in Microsoft Knowledge Base article 2553920: Description of the SharePoint Server 2010 hotfix package (wasrvwfe-x-none.msp): June 28, 2011 (https://go.microsoft.com/fwlink/p/?LinkId=224920). This hotfix enables farm administrators to use Windows PowerShell to specify the URLs that will be processed by Web Analytics by using new parameters in the set-spwebanalyticsserviceapplication cmdlet.

In SharePoint Server 2010, the Web Analytics service cannot scale up beyond 30,000 SharePoint Server components. Prior to this hotfix, this limit applied to the entire farm. The hotfix provides farm administrators with the ability to allow filtering of SharePoint Server farm URLs so that Web Analytics data is collected and processed only on specified farm URLs.

Once a URL is added to the filter list, all usage events under that URL will be processed by the Web Analytics service. All objects in the base Web site and all child Web sites of the specified URL apply to the 30,000 component limit.

If you remove a previously added URL from the allowed filters list, data for the URL remains in the system and counts toward the 30,000 limit. You can remove Web Analytics data from sites that are under removed URLs by purging all Web Analytics data, and then starting data collection again with a fresh list of URLs.

For more information about Web Analytics limits in SharePoint Server 2010, see Capacity requirements for the Web Analytics Shared Service in SharePoint Server 2010.

In this article:

  • Configuring URL filtering for Web Analytics

  • PowerShell command reference

Configuring URL filtering for Web Analytics

To enable URL filtering, you must disassociate the farm from the existing Web Analytics service application, install the hotfix referenced earlier in this article, and then create a new Web Analytics service application. You cannot migrate data from your existing Web Analytics service application. We suggest that you back up your historical data before you begin this process. After the new Web Analytics service applications are provisioned, add the URL that you want to process with Web Analytics to the URL filter list, and then re-associate the content farm with the new service application by using the following procedures.

After you have executed the following procedures and all related jobs and events have been processed, you will be able to see the item count displayed in the Site Web Analytics and Site Collection Web Analytics reports on the Site Settings pages of sites and site collections contained in the URLs you specified in the URL filter list.

Note

The user account that is used to perform these procedures must be a member of the SharePoint Farm Administrators group.

To disassociate the farm from the Web Analytics service application

  1. Stop all Web Analytics service instances on every farm server by using either Central Administration or Windows PowerShell, as described in the following procedures.

    1. To stop the Web Analytics service application by using Central Administration, perform the following steps:

      1. On the Central Administration home page, under System Settings, click Manage services on server.

      2. In the Server box, click the server that you want to manage.

      3. Click Stop for both the Web Analytics Web Service and the Web Analytics Data Processing Service.

    1. To stop the Web Analytics service application by using a Windows PowerShell command prompt, run the following commands:

      1. get-spserviceinstance | where-object {$_.Name -eq "WebAnalyticsServiceInstance"} | stop-spserviceinstance

      2. get-spserviceinstance | where-object {$_.TypeName -eq "Web Analytics Web Service"} | stop-spserviceinstance

  2. Disassociate the content farms from the current Web Analytics service application.

    1. On the Central Administration home page, under Application Management, click Manage Web applications.

    2. On the Web Applications page, click the Web application that you want to disassociate, and then click Service Connections.

    3. In the Configure Service Application Associations dialog box, clear the Web Analytics service application proxy from the proxy group.

To install the hotfix and configure URL filtering

  1. Create a new Web Analytics service application on the service farm. For a procedure to configure a Web Analytics service application by using Central Administration, see Configure Web Analytics service application by using Central Administration. Or, for a procedure to configure a Web Analytics service application by using Windows PowerShell, see Configure the Web Analytics service application by using Windows PowerShell.

  2. Install the hotfix on all servers that run the Web Analytics service applications. To download the hotfix, see KB article 2553920: Description of the SharePoint Server 2010 hotfix package (wasrvwfe-x-none.msp): June 28, 2011 (https://go.microsoft.com/fwlink/p/?LinkId=224920).

  3. Reset IIS on each farm server by running iisreset /noforce from a command prompt.

  4. Open a Windows PowerShell prompt on any farm server.

  5. Configure URL filters on the service farm by specifying the root URLs of the site collections in the URL filter list by using the following command:

    • Set-spwebanalyticsserviceapplication –id “<Service application name>” –UsageUrlFiltersToAdd “<url1>”, “<url2>”, “<url3>”

      URLs should be in the format http://<site collection name> or http://<servername>/<site container, i.e. “sites”>/<site collection name>. When you add a site collection URL to the filter list, any sites or site collections under that URL will also be processed by Web Analytics. Therefore, it is important to make sure that you do not add URLs that contain site collections you do not want Web Analytics to process.

      Note

      If AAM (alternate access mapping) is used, add both the AAM URL and the original URL.

    • Verify that the URL filter list is configured correctly by using the following commands:

      1. $serviceapplication = get-spwebanalyticsserviceapplication –id “<service application name>”

      2. $serviceapplication.UsageUrlFilters

  6. Configure the trust relationship between content and service farms if it is not already done. For more information, see Exchange trust certificates between farms (SharePoint Server 2010).

  7. Publish the Web Analytics service application on the service farm and connect to the service application from the content farms. For more information, see Share service applications across farms (SharePoint Server 2010).

  8. Associate the Web applications where the URL filter list is located to the new Web Analytics service application proxy. For more information, see Add or remove a service application connection to a Web application (SharePoint Server 2010).

  9. Start the Web Analytics Data Processing Service and the Web Analytics Web Service on the service farm by using either Central Administration or Windows PowerShell, as described in the following procedures.

    1. To start the Web Analytics service application by using Central Administration, perform the following steps:

      1. On the Central Administration home page, under System Settings, click Manage services on server.

      2. In the Server box, click the server that you want to manage.

      3. Click Start for both the Web Analytics Web Service and the Web Analytics Data Processing Service.

    1. To start the Web Analytics service application by using a Windows PowerShell command prompt, run the following commands:

      1. get-spserviceinstance | where-object {$_.Name -eq "WebAnalyticsServiceInstance"} | start-spserviceinstance

      2. get-spserviceinstance | where-object {$_.TypeName -eq "Web Analytics Web Service"} | start-spserviceinstance

PowerShell command reference

The following new parameters have been added to the set-spwebanalyticsserviceapplication cmdlet to enable URL filtering functionality.

  • –UsageUrlFiltersToAdd   Adds filters to the list.

  • –UsageUrlFiltersToRemove   Removes filters from the list.

  • Adding URLs to the URL Filter List

    • Set-spwebanalyticsserviceapplication –id “<Service application name>” –UsageUrlFiltersToAdd “<url1>”, “<url2>”, “<url3>” where <urln> is the root URL of a site collections, for example http://<servername>/sites/<site collection name> or https://www.contoso.com

      Note

      If AAM (alternate access mapping) is used, add both the AAM URL and the original URL.

  • Removing URLs from the URL Filter List

    • Set-spwebanalyticsserviceapplication –id “<service application name>” –UsageUrlFiltersToRemove “<url1>”, “<url2>”, “<url3>”

      Note

      When you remove a URL from the filter list, data for this URL is still in the system and counts toward the 30,000 component limit until Web Analytics data is purged and the data collection process restarted.

  • Viewing the URL Filter List

    • $serviceapplication = Get-spwebanalyticsserviceapplication –id “<service application name>”

    • $serviceapplication.UsageUrlFilters

See Also

Concepts

Capacity requirements for the Web Analytics Shared Service in SharePoint Server 2010