3.1.4.1.3.1 DataContext (from namespace http://schemas.datacontract.org/2004/07/Microsoft.Office.Server.WebAnalytics.ProcessedDataRetriever)

A complex type that specifies the properties of the data being requested.

 <xs:complexType name="DataContext">
   <xs:sequence>
     <xs:element minOccurs="0" name="rowCount" type="xs:int"/>
     <xs:element minOccurs="0" name="rowIndex" type="xs:int"/>
     <xs:element minOccurs="0" name="sortOrder" nillable="true" type="tns:ArrayOfSortOrder"/>
     <xs:element minOccurs="0" name="viewName" nillable="true" type="xs:string"/>
     <xs:element minOccurs="0" name="viewParameters" nillable="true" type="tns:ArrayOfViewParameterValue"/>
     <xs:element minOccurs="0" name="viewProperties" nillable="true" xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" type="q1:ArrayOfstring"/>
     <xs:element minOccurs="0" name="whereCondition" nillable="true" type="tns:Condition"/>
   </xs:sequence>
 </xs:complexType>

rowCount:  An xs:int [XMLSCHEMA2] section 3.3.17 element that specifies the number of rows of data to return. 

rowIndex:  An xs:int [XMLSCHEMA2] section 3.3.17 element that specifies the first index of the rows of data to return. The index begins with 1.

sortOrder:  An section ArrayOfSortOrder element that specifies an ordered list of columns to sort the resultant data.

viewName:  An xs:string [XMLSCHEMA2] section 3.2.1 element that specifies the type of data to retrieve. The element MUST be set to one of the following:

viewName

Meaning

fn_WA_GetBestBetSuggestions

Query and URL best bets recommended by the protocol

fn_WA_GetBestBetUsage

Best bet queries, query frequency, best bet URL, best bet URL click frequency and percentage of clicks of best bet URL vs. overall clicks.

fn_WA_GetClickthroughChanges

Pages most visited along with their previous rank and current and previous frequency

fn_WA_GetInventory

Top site templates, product versions, languages, list templates

fn_WA_GetInventoryPerDay

Number of sites (2), site collections, lists, libraries and storage size per day

fn_WA_GetLast24HourClickthroughChanges

Pages most visited in the last 24 hours along with their previous rank and current and previous frequency

fn_WA_GetLast24HourSearchQueryChanges

Search queries most issued in the last 24 hours along with their previous rank and current and previous frequency

fn_WA_GetLast24HourUserDepartments

User departments logged in the last 24 hours. User department is the organizational department information of a user as stored in profile database of profile service.

fn_WA_GetLast24HourUserTitles

User titles logged in the last 24 hours. User title is the organizational title information of a user as stored in profile database of profile service.

fn_WA_GetNumberOfClickthroughs

Total number of page views grouped per day or grouped by URL

fn_WA_GetNumberOfFailedSearchQueriesPerDay

Total number of queries per day that didn’t give satisfactory results. A query gives unsatisfactory results when it gives no results or the results it returns get little or no clicks.

fn_WA_GetNumberOfSearchQueries

Total number of search queries grouped per day or grouped by search query

fn_WA_GetNumberOfSearchQueriesPerDay

Total number of search queries per day

fn_WA_GetSearchQueryChanges

Search queries most issued along with their current and previous frequency and previous rank

fn_WA_GetSummary

Summary report for the entity comprising of Traffic, Search and Inventory Data

fn_WA_GetTopBrowsers

Top browsers

fn_WA_GetTopDestinations

Top URLs that are outside the entity for which data is being requested and are referred by the entity for which data is being requested. The source and destination entities are the site (2)/ site collection / web application. For example this refers to the scenario when the URLs from a site (2) point to the destination site (2).

fn_WA_GetTopFailedSearchQueries

Search queries most issued that didn’t give satisfactory results. A query gives unsatisfactory results when it gives no results or the results it returns get little or no clicks.

fn_WA_GetTopPages

Pages most visited

fn_WA_GetTopReferrers

Top URLs that are outside the entity for which data is being requested and refer the entity for which data is being requested

fn_WA_GetTopSearchQueries

Search queries most issued

fn_WA_GetTopVisitors

Top visitors

fn_WA_GetTotalTrafficVolume

Total number of page views

fn_WA_GetTrafficVolumePerDay

Page views per day

fn_WA_GetUserDepartments

User department names. User department is the organizational department information of a user as stored in profile database of profile service.

fn_WA_GetUserTitles

User titles. User title  is the organizational title information of a user as stored in profile database of profile service.

viewParameters:  An ArrayOfViewParameterValue element that specifies the list of ViewParameterValue elements that are used in conjunction with the viewName parameter to return the requested data. Each parameterName element in the ViewParameterValue element MUST be one of the following:

parameterName

value

Applies to viewName(s)

StartDateId

The start date of the data being requested. The type of value MUST be xs:int [XMLSCHEMA2] section 3.3.17. The value MUST be calculated as the following:

 value   = (((year*100) + month)*100 + day)

where year, month and day are the 4-digit year, 2-digit month and 2-digit day of the date respectively. This parameter is required.

fn_WA_GetBestBetUsage

fn_WA_GetInventoryPerDay

fn_WA_GetNumberOfClickthroughs

fn_WA_GetNumberOfFailedSearchQueriesPerDay

fn_WA_GetNumberOfSearchQueries

fn_WA_GetNumberOfSearchQueriesPerDay

fn_WA_GetScopeNames

fn_WA_GetTopBrowsers

fn_WA_GetTopDestinations

fn_WA_GetTopFailedSearchQueries

fn_WA_GetTopPages

fn_WA_GetTopReferrers

fn_WA_GetTopSearchQueries

fn_WA_GetTopVisitors

fn_WA_GetTotalTrafficVolume

fn_WA_GetTrafficVolumePerDay

fn_WA_GetUserDepartments

fn_WA_GetUserTitles

EndDateId

The end date for the data being requested. The type of value MUST be xs:int [XMLSCHEMA2] section 3.3.17. The value MUST be calculated as the following:

 value   = (((year*100) + month)*100 + day)

where year, month and day are the 4-digit year, 2-digit month and 2-digit day of the date respectively. This parameter is required.

fn_WA_GetBestBetUsage

fn_WA_GetInventoryPerDay

fn_WA_GetNumberOfClickthroughs

fn_WA_GetNumberOfFailedSearchQueriesPerDay

fn_WA_GetNumberOfSearchQueries

fn_WA_GetNumberOfSearchQueriesPerDay

fn_WA_GetScopeNames

fn_WA_GetTopBrowsers

fn_WA_GetTopDestinations

fn_WA_GetTopFailedSearchQueries

fn_WA_GetTopPages

fn_WA_GetTopReferrers

fn_WA_GetTopSearchQueries

fn_WA_GetTopVisitors

fn_WA_GetTotalTrafficVolume

fn_WA_GetTrafficVolumePerDay

fn_WA_GetUserDepartments

fn_WA_GetUserTitles

AggregationId

GUID of entity for which data is being requested. The type of value MUST be xs:string [XMLSCHEMA2] section 3.2.1. This parameter is required.

Applies to all viewNames.

IncludeSubSites

An xs:boolean [XMLSCHEMA2] section 3.2.2 value that specifies if the data being requested should include child objects of the site (2) specified by ComponentId. This parameter is optional.

fn_WA_GetClickthroughChanges

fn_WA_GetInventory

fn_WA_GetInventoryPerDay

fn_WA_GetLast24HourClickthroughChanges

fn_WA_GetLast24HourSearchQueryChanges

fn_WA_GetLast24HourUserDepartments

fn_WA_GetLast24HourUserTitles

fn_WA_GetNumberOfClickthroughs

fn_WA_GetNumberOfFailedSearchQueriesPerDay

fn_WA_GetNumberOfSearchQueries

fn_WA_GetNumberOfSearchQueriesPerDay

fn_WA_GetSearchQueryChanges

fn_WA_GetSummary

fn_WA_GetTopBrowsers

fn_WA_GetTopDestinations

fn_WA_GetTopFailedSearchQueries

fn_WA_GetTopPages

fn_WA_GetTopReferrers

fn_WA_GetTopSearchQueries

fn_WA_GetTopVisitors

fn_WA_GetTotalTrafficVolume

fn_WA_GetTrafficVolumePerDay

ScopeName

An xs:string [XMLSCHEMA2] section 3.2.1 that specifies the name of the search scope specified for the search query. This parameter is optional.

fn_WA_GetLast24HourClickthroughChanges

fn_WA_GetLast24HourSearchQueryChanges

fn_WA_GetNumberOfClickthroughs

fn_WA_GetNumberOfSearchQueries

fn_WA_GetNumberOfSearchQueriesPerDay

fn_WA_GetSearchQueryChanges

fn_WA_GetTopFailedSearchQueries

fn_WA_GetTopSearchQueries

UserTitle

An xs:string [XMLSCHEMA2] section 3.2.1 value that specifies that the data should be scoped to the specified user title. This parameter is optional.

fn_WA_GetClickthroughChanges

fn_WA_GetLast24HourClickthroughChanges

fn_WA_GetLast24HourSearchQueryChanges

fn_WA_GetNumberOfClickthroughs

fn_WA_GetNumberOfSearchQueries

fn_WA_GetSearchQueryChanges

UserDepartment

An xs:string [XMLSCHEMA2] section 3.2.1 value that specifies that the data should be scoped to the specified user department. This parameter is optional.

fn_WA_GetClickthroughChanges

fn_WA_GetLast24HourClickthroughChanges

fn_WA_GetLast24HourSearchQueryChanges

fn_WA_GetNumberOfClickthroughs

fn_WA_GetNumberOfSearchQueries

fn_WA_GetSearchQueryChanges

CurrentStartDateId

The start date of the current date range. The type of value MUST be xs:int [XMLSCHEMA2] section 3.3.17. The value MUST be calculated as the following:

 value   = (((year*100) + month)*100 + day)

where year, month and day are the 4-digit year, 2-digit month and 2-digit day of the date respectively.

This parameter is required.

fn_WA_GetClickthroughChanges

fn_WA_GetSearchQueryChanges

fn_WA_GetSummary

PreviousStartDateId

The start date of the past date range. The type of value MUST be xs:int [XMLSCHEMA2] section 3.3.17. The value MUST be calculated as the following:

 value   = (((year*100) + month)*100 + day)

where year, month and day are the 4-digit year, 2-digit month and 2-digit day of the date respectively. This parameter is required. If current start date is s1 and previous start date is p1 where p1 is earlier than s1 then the data is compared for time periods (p1 to s1-1)  and (s1 + (s1 – p1)). For example is the p1 is July 1 and s1 is August 1 then the data is compared for the periods (07/01 – 07/ 31) and (08/01 - 08/31)

fn_WA_GetClickthroughChanges

fn_WA_GetSearchQueryChanges

fn_WA_GetSummary

Duration

The duration of the date range in number of days. The type of value MUST be xs:int [XMLSCHEMA2] section 3.3.17. This parameter is required.

fn_WA_GetClickthroughChanges

fn_WA_GetSearchQueryChanges

fn_WA_GetSummary

GroupByDate

An xs:boolean [XMLSCHEMA2] section 3.2.2 value that specifies if the data being requested should be grouped by date. This parameter is optional.

fn_WA_GetNumberOfClickthroughs

fn_WA_GetNumberOfSearchQueries

GroupByQueryText

An xs:boolean [XMLSCHEMA2] section 3.2.2 value that specifies if the data being requested should be grouped by search query text. This parameter is optional.

fn_WA_GetNumberOfSearchQueries

GroupByPageId

An xs:boolean [XMLSCHEMA2] section 3.2.2 value that specifies if the data being requested should be grouped by URL. This parameter is optional.

fn_WA_GetNumberOfClickthroughs

MetricType

An xs:int [XMLSCHEMA2] section 3.3.17 value that specifies the type of metric to return. The value MUST be one of the MetricType values logged via LogFeedback. This parameter is required.

fn_WA_GetInventory

fn_WA_GetTrafficVolumePerDay

fn_WA_GetTotalTrafficVolume

DimensionType

An xs:int [XMLSCHEMA2] section 3.3.17 value that specifies the type of inventory to return. The value MUST be one of the DimensionType values logged via LogFeedback. This parameter is required.

fn_WA_GetInventory

viewProperties:  Reserved. MUST be NULL.

whereCondition: A Condition element that is used to filter the data to return.