FireDAC Components for Google Analytics

Build 20.0.7587

SiteSearch

Retrieves internal Site Search data.

Table Specific Information

Select

Google Analytics only allows up to 10 Metrics and 7 Dimensions in a single query. Therefore, when issuing a query that selects all columns, only the default Metric columns will be selected for tables with more than 10 Metrics. The default Dimensions will be used unless you explicitly select other dimension columns. The following query uses SearchStartPage instead of the default SearchKeyword dimension:

SELECT SearchStartPage, SearchSessions, PercentSessionsWithSearch, SearchUniques, SearchResultViews, AvgSearchResultViews, SearchExits, PercentSearchRefinements, SearchDuration, AvgSearchDuration, AvgSearchDepth FROM SiteSearch
Filters can also be used in the WHERE clause. Dimension fields support the =, !=, LIKE, and NOT LIKE operators. Metric fields support =, !=, >, >=, <, and <= operators. This query will return the number of sessions for a 'software' Search Category:
SELECT SearchCategory, SearchSessions FROM SiteSearch WHERE SearchCategory='software'
All reports in Google Analytics must cover a specific date range. The default behavior is to pull the last month of data if the StartDate and EndDate inputs are left unset. To override this behavior, the values can be set directly in the query. For example:
SELECT * FROM SiteSearch WHERE StartDate='90daysAgo' AND EndDate='Today'
Because there are more than 10 Metrics available for the SiteSearch table, a query that selects all columns only returns the default Metrics for this table (see columns marked as default Metrics below). If you need to select other Metrics, select them explicitly instead of using '*'. The default dimension for the table will be used unless another dimension is specified in the select columns, the DefaultFilter, or set in the Dimensions column in the WHERE clause. See the note on Establishing a Connection for a limitation with some tools. The following queries return the same results:
SELECT * FROM SiteSearch
SELECT SearchKeyword, SearchSessions, PercentSessionsWithSearch, SearchUniques, SearchResultViews, AvgSearchResultViews, SearchExits, PercentSearchRefinements, SearchDuration, AvgSearchDuration, AvgSearchDepth FROM SiteSearch

Columns

Name Type Dimension DefaultMetric DefaultDimension Description
Date Date True The date of the session formatted as YYYYMMDD.
Year Integer True The year of the session. A four-digit year from 2005 to the current year.
Month Integer True The month of the session. An integer from 01 to 12.
Week Integer True The week of the session. A number from 01 to 53. Each week starts on Sunday.
Day Integer True The day of the month. A number from 01 to 31.
Hour Integer True An hour of the day ranging from 00-23 in the timezone configured for the account. This value is also corrected for daylight savings time.
SearchKeyword String True True Search terms used by users within your property.
SearchCategory String True The categories used for the internal search if you have this enabled for your profile. For example, product categories, such as electronics, furniture, or clothing.
SearchStartPage String True A page where the user initiated an internal search on your property.
SearchSessions Integer False True The total number of sessions that included an internal search.
PercentSessionsWithSearch Double False True The percentage of sessions with search.
SearchUniques Integer False True The total number of unique keywords from internal searches within a session.
SearchResultViews Integer False True The number of times a search result page was viewed after performing a search.
AvgSearchResultViews Double False True The average number of times people viewed a search results page after performing a search.
SearchExits Integer False True The number of exits on your site that occurred following a search result from your internal search feature.
SearchExitRate Double False The percentage of searches that resulted in an immediate exit from your property.
SearchRefinements Integer False The total number of times a refinement (transition) occurs between internal search keywords within a session.
PercentSearchRefinements Double False True The percentage of number of times a refinement (i.e., transition) occurs between internal search keywords within a session.
SearchDuration Double False True The session duration on your property where a use of your internal search feature occurred.
AvgSearchDuration Double False The average amount of time people spent on your property after searching.
SearchDepth Integer False The average number of subsequent page views made on your property after a use of your internal search feature.
AvgSearchDepth Double False True The average number of pages people viewed after performing a search on your property.
StartDate String Start date for fetching Analytics data. Either a date string or a relative date (e.g., today, yesterday, or #daysAgo).
EndDate String End date for fetching Analytics data. Either a date string or a relative date (e.g., today, yesterday, or #daysAgo).
Dimensions String A comma-separated list of dimensions to retrieve in addition to the columns defined in the schema. Set to empty string to retrieve no dimensions.
Metrics String A comma-separated list of metrics to retrieve in addition to the columns defined in the schema.
CohortTypes String Available only when using the V4 API. A comma-separated list of cohort types. The default value is FIRST_VISIT_DATE
CohortStartDates Date Available only when using the V4 API. A comma-separated list of cohort start dates.
CohortEndDates Date Available only when using the V4 API. A comma-separated list of cohort end dates.
SamplesReadCounts String Comma separated list of samples read counts when the response data is sampled.
SamplingSpaceSizes String Comma separated list of samples space sizes counts when the response data is sampled.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Segments String Segments the data returned for your request. Either a SegmentId or a custom segment.
Profile String The Profile ID or website URL to retrieve data from.

Copyright (c) 2020 CData Software, Inc. - All rights reserved.
Build 20.0.7587