Forum Discussion

nigelreilly's avatar
nigelreilly
Helper I
8 years ago
Solved

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,

 

  • Anonymous's avatar
    Anonymous
    8 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:

    Google Analytics Filters

    Core Reporting API - Reference Guide

     

    Spoiler

    Query 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
    ids string yes 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-date string yes 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, or NdaysAgo where N is a positive integer).
    end-date string yes 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, or NdaysAgo where N is a positive integer).
    metrics string yes A list of comma-separated metrics, such as ga:sessions,ga:bounces.
    dimensions string no A list of comma-separated dimensions for your Analytics data, such as ga:browser,ga:city.
    sort string no A list of comma-separated dimensions and metrics indicating the sorting order and sorting direction for the returned data.
    filters string no Dimension or metric filters that restrict the data returned for your request.
    segment string no Segments the data returned for your request.
    samplingLevel string no 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-rows boolean no Defaults to true; if set to false, rows where all metric values are zero will be omitted from the response.
    start-index integer no The first row of data to retrieve, starting at 1. Use this parameter as a pagination mechanism along with the max-results parameter.
    max-results integer no The maximum number of rows to include in the response.
    output string no The desired output type for the Analytics data returned in the response. Acceptable values are json and dataTable. Default: json.
    fields string no Selector specifying a subset of fields to include in the response.
    prettyPrint string no Returns response with indentations and line breaks. Default false.
    userIp string no Specifies IP address of the end user for whom the API call is being made. Used to cap usage per IP.
    quotaUser string no Alternative to userIp in cases when the user's IP address is unknown.
    access_token string no One possible way to provide an OAuth 2.0 token.
    callback string no Name of the JavaScript callback function that handles the response. Used in JavaScript JSON-P requests.
    key string no Used for OAuth 1.0a authorization to specify your application to get quota. For example:key=AldefliuhSFADSfasdfasdfASdf.

     

    Regards,

    Xiaoxin Sheng

1 Reply

  • Anonymous's avatar
    Anonymous
    Not 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:

    Google Analytics Filters

    Core Reporting API - Reference Guide

     

    Spoiler

    Query 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
    ids string yes 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-date string yes 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, or NdaysAgo where N is a positive integer).
    end-date string yes 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, or NdaysAgo where N is a positive integer).
    metrics string yes A list of comma-separated metrics, such as ga:sessions,ga:bounces.
    dimensions string no A list of comma-separated dimensions for your Analytics data, such as ga:browser,ga:city.
    sort string no A list of comma-separated dimensions and metrics indicating the sorting order and sorting direction for the returned data.
    filters string no Dimension or metric filters that restrict the data returned for your request.
    segment string no Segments the data returned for your request.
    samplingLevel string no 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-rows boolean no Defaults to true; if set to false, rows where all metric values are zero will be omitted from the response.
    start-index integer no The first row of data to retrieve, starting at 1. Use this parameter as a pagination mechanism along with the max-results parameter.
    max-results integer no The maximum number of rows to include in the response.
    output string no The desired output type for the Analytics data returned in the response. Acceptable values are json and dataTable. Default: json.
    fields string no Selector specifying a subset of fields to include in the response.
    prettyPrint string no Returns response with indentations and line breaks. Default false.
    userIp string no Specifies IP address of the end user for whom the API call is being made. Used to cap usage per IP.
    quotaUser string no Alternative to userIp in cases when the user's IP address is unknown.
    access_token string no One possible way to provide an OAuth 2.0 token.
    callback string no Name of the JavaScript callback function that handles the response. Used in JavaScript JSON-P requests.
    key string no Used for OAuth 1.0a authorization to specify your application to get quota. For example:key=AldefliuhSFADSfasdfasdfASdf.

     

    Regards,

    Xiaoxin Sheng