Export (0) Print
Expand All

Configure Web Analytics service application (SharePoint Server 2010)

 

Applies to: SharePoint Server 2010

Topic Last Modified: 2011-08-05

This article describes how to configure the Web Analytics service application in Microsoft SharePoint Server 2010. Once the Web Analytics service application is configured, you are able to collect, report, and analyze the usage and effectiveness of SharePoint Server 2010 sites. For different ways to schedule and display these reports, you can use Web Analytics Workflow and Web Analytics Web Parts, respectively. By using these features, you are able to understand what users are doing and can better understand what information they want from a site.

Before you configure the SharePoint Web Analytics service application, we recommend that you read Capacity requirements for the Web Analytics Shared Service in SharePoint Server 2010

In this article:

The Web Analytics service application is automatically configured as part of the Basic installation of Microsoft SharePoint Server 2010.

Advanced installation of SharePoint Server 2010 requires separate configuration of the Web Analytics service application. You can configure the Web Analytics service application after installation of SharePoint Server 2010 by using one of the following tools:

  • Farm Configuration Wizard

  • Central Administration

  • Windows PowerShell

The default configuration for the Web Analytics service application consists of:

  • One Web Analytics service application.

  • One Web Analytics Reporting database and one Web Analytics Staging database. The databases must be associated with the service application. For additional information about reporting and staging databases, see Database types and descriptions (SharePoint Server 2010).

    noteNote
    There is no support for configuring the Web Analytics Reporting and Web Analytics Staging databases to use SQL authentication.
  • One Web Analytics Service application proxy associated with the default proxy group of the server farm.

After setup is finished, the opening page of the Farm Configuration Wizard opens automatically. The administrator can choose to run the wizard immediately or wait until later. In the Farm Configuration Wizard, all service applications that are not currently configured are selected for configuration by default. If you do not want to configure the Web Analytics service application until later, you can clear the check box for the service and run the Farm Configuration Wizard later.

noteNote
Until you configure the Web Analytics service application, you will not be able to run or create reports that use the Web Analytics service application.

If the Web Analytics service application check box is unavailable, it has already been configured. After initial configuration, you can only configure the Web Analytics service application by using the Central Administration Web site or Windows PowerShell.

To configure the Web Analytics service application by using the Farm Configuration Wizard
  1. On the Central Administration Web site, click Configuration Wizards.

  2. On the Configuration Wizards page, click Launch the Farm Configuration Wizard.

  3. On the first page of the Farm Configuration Wizard, click Start the Wizard.

  4. On the services configuration page, in the Services section, click to select the Web Analytics Service Application check box.

    noteNote
    If the Web Analytics Service Application check box is unavailable, the Web Analytics service application is already configured. To make changes to the configuration you must use Windows PowerShell or the Central Administration Web site.
  5. Click Next.

  6. Complete any other configuration steps for the server farm.

  7. On the final page of the Farm Configuration Wizard, click Finish.

You can use Central Administration to configure the Web Analytics service application. The following five steps are required to configure the Web Analytics service application:

  1. Create the Web Analytics service application.

  2. Associate one or more Web applications with a Web Analytics service application.

  3. Verify that the Web Analytics Web Service and Web Analytics Data Processing Service are started.

  4. Verify that usage logging is enabled for the desired event. For information about events and usage logging, see Configure usage and health data collection (SharePoint Server 2010).

  5. Verify that the State Service Application and State Service Application Proxy are started.

To create the Web Analytics service application by using Central Administration
  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. In Central Administration, on the Home page, click Application Management.

  3. On the Application Management page, in the Service Applications section, click Manage service applications.

  4. On the ribbon, click New, and then click Web Analytics Service Application.

  5. For the Application Pool parameter, specify an existing application pool name or create a new application pool name.

  6. For the Database Server parameter, specify a database server name for the service application.

  7. For the Staging Database Name parameter, type the name of the staging database.

  8. For the Reporting Database Name parameter, type the name of the reporting database.

  9. Click OK.

To associate a Web application with a Web Analytics Service application by using Central Administration
  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. In Central Administration, on the Home page, click Application Management.

  3. On the Application Management page, in the Service Applications section, click Configure service application associations.

  4. If the Web Analytics Service application proxy is not included in the list of application proxies, click the appropriate Web application. Next, in the Configure Service Applications Associations dialog box, select the Web Analytics Service Application Proxy check box to associate it with the Web application.

To verify that the Web Analytics Data Processing Service and the Web Analytics Web Service are started by using Central Administration
  1. Verify the following that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group and that procedure is performed on the application server.

  2. In Central Administration, click System Settings.

  3. On the System Settings page, in the Servers section, click Manage services on server.

  4. From the Action column, click Start for the Web Analytics Data Processing Service and the Web Analytics Web Service.

To verify that usage logging is enabled for desired event by using Central Administration
  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. In Central Administration, on the Home page, click Monitoring.

  3. On Monitoring page, in the Reporting section, click Configure usage and health data collection.

  4. On the Event Selection section, click all check boxes to select them, and then click OK.

For additional information about usage logging and Web analytics service, see "Capacity Requirements for Web Analytics Shared Service in SharePoint Server 2010", accessible from Performance and capacity test results and recommendations (SharePoint Server 2010).

To verify that the State Service application is started by using Central Administration
  1. Verify that the user account that is performing this procedure is a member of the Farm Administrators SharePoint group.

  2. In Central Administration, click Application Management.

  3. On Application Management page, in the Service Applications section, click Manage service applications.

  4. In the list of service applications, verify that State Service Application and State Service Application Proxy are set to Started. If the State Service Application or State Service Application Proxy are not started, see Manage the State Service (SharePoint Server 2010).

To configure the Web Analytics service application by using Windows PowerShell
  1. Verify that you meet the following minimum requirements:

  2. Copy the following code and paste it into a text editor, such as Notepad.

    noteNote
    To use a specific database name with this script, the database name must be created before the script is run. For information about how to use DBA-created databases, see Deploy by using DBA-created databases (SharePoint Server 2010).
    
    Add-pssnapin Microsoft.SharePoint.PowerShell
         #Get Central Admin server
          $CentralAdminInstance = Get-SPServiceInstance | ? { $_.TypeName -eq "Central administration" } | ? {$_.Status -eq "Online"}
         $CentralAdminServer = $CentralAdminInstance.Server.Address
    
         #Get default SQL server
    $configDB = Get-SPDatabase | ? { $_.Type -eq "Configuration Database" }
    $DatabaseServer = $configDB.NormalizedDataSource     
    
         #Create Analytics Web Application
    write-host "Creating web analytics service application"
    
         #Create app pool
         #Get Analytics Windows Service instance
    $serviceInstance = Get-SPServiceInstance | where-object {$_.Name -eq "WebAnalyticsServiceInstance"} | where-object {$_.Server.Address -eq $CentralAdminServer}
    $windowsservice = $serviceInstance.Service
    $serviceAccount = Get-SPManagedAccount -service $windowsservice
         
    $ServiceApplicationName = "AnalyticsServiceApplication1"
    $StagerDatabase = $ServiceApplicationName + "Stager"
    $WarehouseDatabase = $ServiceApplicationName + "Warehouse"
    $StagerSubscription = "<StagingDatabases><StagingDatabase ServerName='$DatabaseServer' DatabaseName='$StagerDatabase'/></StagingDatabases>"
    $WarehouseSubscription = "<ReportingDatabases><ReportingDatabase ServerName='$DatabaseServer' DatabaseName='$WarehouseDatabase'/></ReportingDatabases>" 
         $ExistingServiceApp = Get-SPServiceApplication | where-object {$_.Name -eq $ServiceApplicationName}
         if ($ExistingServiceApp -ne $null)
         {
              Remove-SPServiceApplication $ExistingServiceApp -Confirm:$false
         }
         
         $ExistingServiceAppProxy = Get-SPServiceApplicationProxy | where-object {$_.Name -eq $ServiceApplicationName}
         if ($ExistingServiceAppProxy -ne $null)
         {
              Remove-SPServiceApplicationProxy $ExistingServiceAppProxy -Confirm:$false
         }
         #Check if application pool already exist, if so update it
    $ApplicationPool = Get-SPServiceApplicationPool | where {$_.Name -eq $ServiceApplicationName}
         if ($ApplicationPool -ne $null)
         {
              Set-SPServiceApplicationPool $ApplicationPool -Account $serviceAccount 
         }
         else
         {
    
         #Creating app pool for service app
         
              $ApplicationPool = New-SPServiceApplicationPool -Name $ServiceApplicationName -Account $serviceAccount
         }
         $ServiceApplication = New-SPWebAnalyticsServiceApplication -Name $ServiceApplicationName -ReportingDataRetention 20 -SamplingRate 100 -ListOfReportingDatabases $WarehouseSubscription -ListOfStagingDatabases $StagerSubscription -ApplicationPool $ApplicationPool 
    
         #Create Web Analytics Service Application Proxy
    write-host "Creating Web Analytics Service Application Proxy"
    New-SPWebAnalyticsServiceApplicationProxy  -Name $ServiceApplicationName -ServiceApplication $ServiceApplication.Name
         
         #Start Analytics service instances
    write-host "Starting Analytics Service instances ..."
    $AnalyticsDataProcessingInstance = Get-SPServiceInstance | where-object {$_.Name -eq "WebAnalyticsServiceInstance"} | where-object {$_.Server.Address -eq $CentralAdminServer
    $AnalyticsWebServiceInstance = Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Web Service"} | where-object {$_.Server.Address -eq $CentralAdminServer}
         
         Start-SPServiceInstance $AnalyticsDataProcessingInstance
         Start-SPServiceInstance $AnalyticsWebServiceInstance
    
         
    #Check to see if the State Service Application is available
         $state = Get-SPStateServiceApplication
    
    
    $stateName = "Default State Service Application"
    
    if($state -eq $null)
    
    {
    
    Write-Host "Creating the State Service Application" -foregroundcolor yellow
    
    $state = New-SPStateServiceApplication -Name $stateName 
    
    Write-Host "Creating the State Service Application Proxy" -foregroundcolor yellow
    
    $state | New-SPStateServiceApplicationProxy -Name $stateName
    
    }
    
    $state = Get-SPServiceApplication | where {($_.name) -eq $stateName}
    
    if($state -ne $null)
    
    {
    
    Write-Host "Service application created" -ForegroundColor Yellow
    
    }
    
         write-host "Done."
    
  3. Save the file, naming it WebAnalytics.ps1.

    noteNote
    You can use a different file name, but you must save the file as an ANSI-encoded text file whose extension is .ps1.
  4. On the Start menu, click All Programs.

  5. Click Microsoft SharePoint 2010 Products.

  6. Click SharePoint 2010 Management Shell.

  7. Change to the directory where you saved the file.

  8. At the Windows PowerShell command prompt, type the following command:

    ./WebAnalytics.ps1 
    

After the Web Analytics service application is configured, the View Web Analytics Data permission needs to be created for users that are not a site collection administrator or site owner. This is the minimum required permission needed to view Web Analytics reports. End users who need to access a Web Analytics report must have this permission assigned to them.

To create the View Web Analytics Data permission for a site or site collection
  1. Verify that the user account that is performing this procedure is that of a site collection administrator or a site owner.

  2. From a site or site collection, click Site Permissions from the Site Actions menu.

  3. On Site Permissions page, on the Edit tab, in the Manage group, click Permission Levels.

  4. Click Add a Permission Level.

  5. In the Name field, type View Web Analytics Data.

  6. In the Permissions section, under the List Permissions, select the View Application Pages check box.

  7. In the Permissions section, under the Site Permissions, select the View Web Analytics Data and Enumerate Permissions check boxes.

  8. Click Create.

To configure the View Web Analytics Data permission for a site or site collection
  1. Verify that the user account that is performing this procedure is that of a site collection administrator or a site owner.

  2. From a site or site collection, click Site Permissions from the Site Actions menu.

  3. On the Site Permissions page, on the Edit tab, in the Grant group, click Grant Permissions.

  4. In the Users/Groups box, add the users that will be granted the View Web Analytics Data permission.

  5. In the Grant Permissions section, click Grant users permission directly, and then select the View Web Analytics Data check box.

  6. Click OK.

After the Web Analytics service application is configured, you can schedule a workflow to run a Web Analytics report or a Web Analytics alert depending on the criterion that is met. For additional information about Web Analytics workflow, see Reporting and usage analysis overview (SharePoint Server 2010).

To create the Web Analytics report for a site
  1. Verify that the user account that is performing this procedure is that of a site owner or site collection administrator.

  2. From the root level of a site, click Site Settings from the Site Actions menu.

  3. On Site Settings page, click Workflow settings under the Site Administration section.

  4. Click Add a workflow.

  5. In the Select a workflow template field, choose either an alert or report workflow.

  6. In the Name field, type the name of the workflow.

  7. In the Task list field, select the appropriate task list that will be used with this workflow. If none is available, click New task list.

  8. In the History list field, select the appropriate history list to be used with this workflow. If none is available, click Workflow History (new).

  9. In the Start Options field, select the appropriate permission level to start the workflow. By default, the workflow is manually started by an authenticated user.

  10. In the Recipients field, type the name of the users who should receive the report.

  11. In the Message field, type a message to be included in the e-mail message that is sent to the recipients.

  12. In the Frequency field, select the frequency for this workflow. The default value is daily.

  13. In the Start Date field, select the date to start the workflow. The default value is Today.

  14. In the End Date field, select the date to end the workflow. The default value is Never.

  15. In the Site Scope field, specify the scope of this workflow. The default value is This Site Collection.

  16. In the Web Analytics Reports field, select the reports to include in the workflow.

  17. Click Finish.

To create the Web Analytics alert workflow for a site collection
  1. Verify that the user account that is performing this procedure is that a site owner or site collection administrator.

  2. From the root level of a site collection, click Site Settings from the Site Actions menu.

  3. On Site Settings page, click Workflow settings under the Site Administration section.

  4. Click Add a workflow.

  5. In the Select a workflow template field, choose either an alert workflow.

  6. In the Name field, type the name of the workflow.

  7. In the Task list field, select the appropriate task list that will be used with this workflow. If none is available, click New task list.

  8. In the History list field, select the appropriate history list to be used with this workflow. If none is available, click Workflow History (new).

  9. In the Start Options field, select the appropriate permission level to start the workflow. By default, the workflow is manually started by an authenticated user.

  10. Click Next.

  11. In the Recipients field, type the name of the users who should receive the report.

  12. In the Message field, type a message to be included in the e-mail message that is sent to the recipients.

  13. In the Site Scope field, specify the scope of this workflow. The default value is This Site Collection.

  14. In the Condition(s) field, specify data condition(s) that will cause the workflow to send an e-mail.

  15. Click Finish.

After the Web Analytics service application is configured, a site administrator or site owner can add a Web Part to a site to quickly view specific reports. For additional information about Web Analytics Web Part, see Reporting and usage analysis overview (SharePoint Server 2010).

To create the Web Analytics Web Part for a site collection
  1. Verify that the user account that is performing this procedure is that of a site owner or site collection administrator.

  2. From the root level of a site collection, click the Page tab.

  3. From the Edit group on the ribbon, click Edit .

  4. Under Editing Tools, click the Insert tab.

  5. From the Web Parts group, click Web Part.

  6. From the Categories column, click Content Rollup.

  7. From the Web Parts column, click Web Analytics Web Part, and then click Add.

  8. By default, the Most Viewed Content report will be displayed. To change the type of report to be displayed in the Web Part, you must edit the Web Part and change its properties.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft