AnalyticsSessions
Breaks down analytics data by user sessions, providing visibility into visitor behavior across sessions.
Table Specific Information
Get analytics data broken down by sessions.
SELECT
When selecting analytics for event completions, they can only be filtered by the StartDate, EndDate, Granularity, Filter, FirstDrilldown, SecondDrilldown, Exclude, FilterId, Sort or SortDirection. The filters must use an exact comparison. For example:
SELECT * FROM AnalyticsSessions WHERE Granularity = 'total' AND StartDate = '12/1/2017' AND EndDate = '12/30/2018' SELECT * FROM AnalyticsSessions WHERE Granularity = 'monthly' AND StartDate = '12/1/2017' AND EndDate = '12/30/2018' AND Filter = 'hubspot'
Columns
| Name | Type | References | Description |
| Sessions | String | Provides the source category or type for each session tracked in the analytics data. | |
| Desktop | Long | Total number of sessions initiated from desktop devices. | |
| DirectTraffic | Long | Total number of sessions generated from direct traffic sources, where no referral information is available. | |
| EmailMarketing | Long | Total number of sessions originating from email marketing campaigns. | |
| Mobile | Long | Total number of sessions initiated from mobile devices. | |
| OrganicSearch | Long | Total number of sessions from organic search results on search engines. | |
| OtherCampaigns | Long | Total number of sessions from campaigns categorized under 'Other Campaigns'. | |
| Others | Long | Total number of sessions categorized under 'Other' sources not classified elsewhere. | |
| PaidSearch | Long | Total number of sessions originating from paid search campaigns, such as Google Ads. | |
| PaidSocial | Long | Total number of sessions originating from paid social media advertising. | |
| Referrals | Long | Total number of sessions referred from external websites. | |
| SocialMedia | Long | Total number of sessions originating from social media platforms such as Facebook, Twitter, or LinkedIn. | |
| FirstDrilldown | String | Primary drilldown parameter for segmenting session data, reflecting source report functionality. | |
| SecondDrilldown | String | Secondary drilldown parameter for further segmenting session data, similar to FirstDrilldown. | |
| BreakdownDate | Date | Start date of the breakdown data aggregation period. Applicable for these granularity types: daily, weekly, monthly, summarize/daily, summarize/weekly, summarize/monthly. |
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. For more information, see the WHERE clause section.
| Name | Type | Description | |
| StartDate | Date | Specifies the starting date of the query range to filter session data. | |
| EndDate | Date | Specifies the ending date of the query range to limit session data. | |
| Granularity | String | Defines the time interval for data grouping. Acceptable values include total, daily, weekly, monthly, summarize/daily, summarize/weekly, summarize/monthly. | |
| Filter | String | Filters results to include only records matching the specified breakdowns. Multiple filters can be applied. | |
| Exclude | String | Excludes records matching the specified breakdowns from the results. Multiple exclusions are supported. | |
| FilterId | String | Specifies the ID of a HubSpot Analytics view. Filters the returned data to match the selected view. |