Forum Discussion
Restricting data by date connecting to google analytics
Hi,
Is there anyway to restrict the amount of data coming from google analytics before the load? I can filter after the load but it seems to still take a while.
We have data going back 6 years but I am only interested in the past year. I understand retrieving page, page view by hour and date will take a long while but if there is a way to filter it pre-laod id love to know how.
Thanks,
- Anonymous8 years ago
Hi nigelreilly,
I haven't found any options to setting filters for google analysis connector, I'd like to suggest you to use google analytics api to instead.
Reference:
Core Reporting API - Reference Guide
SpoilerQuery Parameters Summary
The following table summarizes all the query parameters accepted by the Core reporting API. Click each parameter name for a detailed description.
Name Value Required Summary idsstringyes The unique table ID of the form ga:XXXX, where XXXX is the Analytics view (profile) ID for which the query will retrieve the data. start-datestringyes Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g.,today,yesterday, orNdaysAgowhereNis a positive integer).end-datestringyes End date for fetching Analytics data. Request can specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g.,today,yesterday, orNdaysAgowhereNis a positive integer).metricsstringyes A list of comma-separated metrics, such as ga:sessions,.ga:bounces dimensionsstringno A list of comma-separated dimensions for your Analytics data, such as ga:browser,.ga:city sortstringno A list of comma-separated dimensions and metrics indicating the sorting order and sorting direction for the returned data. filtersstringno Dimension or metric filters that restrict the data returned for your request. segmentstringno Segments the data returned for your request. samplingLevelstringno The desired sampling level. Allowed Values: DEFAULT— Returns response with a sample size that balances speed and accuracy.FASTER— Returns a fast response with a smaller sample size.HIGHER_PRECISION— Returns a more accurate response using a large sample size, but this may result in the response being slower.
include-empty-rowsbooleanno Defaults to true; if set to false, rows where all metric values are zero will be omitted from the response. start-indexintegerno The first row of data to retrieve, starting at 1. Use this parameter as a pagination mechanism along with the max-resultsparameter.max-resultsintegerno The maximum number of rows to include in the response. outputstringno The desired output type for the Analytics data returned in the response. Acceptable values are jsonanddataTable. Default:json.fieldsstringno Selector specifying a subset of fields to include in the response. prettyPrintstringno Returns response with indentations and line breaks. Default false.userIpstringno Specifies IP address of the end user for whom the API call is being made. Used to cap usage per IP. quotaUserstringno Alternative to userIp in cases when the user's IP address is unknown. access_tokenstringno One possible way to provide an OAuth 2.0 token. callbackstringno Name of the JavaScript callback function that handles the response. Used in JavaScript JSON-P requests. keystringno Used for OAuth 1.0a authorization to specify your application to get quota. For example: key=AldefliuhSFADSfasdfasdfASdf.Regards,
Xiaoxin Sheng
1 Reply
- AnonymousNot applicable
Hi nigelreilly,
I haven't found any options to setting filters for google analysis connector, I'd like to suggest you to use google analytics api to instead.
Reference:
Core Reporting API - Reference Guide
SpoilerQuery Parameters Summary
The following table summarizes all the query parameters accepted by the Core reporting API. Click each parameter name for a detailed description.
Name Value Required Summary idsstringyes The unique table ID of the form ga:XXXX, where XXXX is the Analytics view (profile) ID for which the query will retrieve the data. start-datestringyes Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g.,today,yesterday, orNdaysAgowhereNis a positive integer).end-datestringyes End date for fetching Analytics data. Request can specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g.,today,yesterday, orNdaysAgowhereNis a positive integer).metricsstringyes A list of comma-separated metrics, such as ga:sessions,.ga:bounces dimensionsstringno A list of comma-separated dimensions for your Analytics data, such as ga:browser,.ga:city sortstringno A list of comma-separated dimensions and metrics indicating the sorting order and sorting direction for the returned data. filtersstringno Dimension or metric filters that restrict the data returned for your request. segmentstringno Segments the data returned for your request. samplingLevelstringno The desired sampling level. Allowed Values: DEFAULT— Returns response with a sample size that balances speed and accuracy.FASTER— Returns a fast response with a smaller sample size.HIGHER_PRECISION— Returns a more accurate response using a large sample size, but this may result in the response being slower.
include-empty-rowsbooleanno Defaults to true; if set to false, rows where all metric values are zero will be omitted from the response. start-indexintegerno The first row of data to retrieve, starting at 1. Use this parameter as a pagination mechanism along with the max-resultsparameter.max-resultsintegerno The maximum number of rows to include in the response. outputstringno The desired output type for the Analytics data returned in the response. Acceptable values are jsonanddataTable. Default:json.fieldsstringno Selector specifying a subset of fields to include in the response. prettyPrintstringno Returns response with indentations and line breaks. Default false.userIpstringno Specifies IP address of the end user for whom the API call is being made. Used to cap usage per IP. quotaUserstringno Alternative to userIp in cases when the user's IP address is unknown. access_tokenstringno One possible way to provide an OAuth 2.0 token. callbackstringno Name of the JavaScript callback function that handles the response. Used in JavaScript JSON-P requests. keystringno Used for OAuth 1.0a authorization to specify your application to get quota. For example: key=AldefliuhSFADSfasdfasdfASdf.Regards,
Xiaoxin Sheng