The ElastiCube Manager enables easy and quick access to tables contained within Google Analytics. The steps below describe how to connect to this type of data source.
Note: Google Analytics provides a quota on the free daily API requests. For this reason a developer key must be supplied. Read more details about Quota Limits.
- Click Add Data in the top menu of the ElastiCube Manager.
- Under the Web Services category, select Google Analytics.
- You will be prompted to enter the following information:
- Email: Enter email associated with your Google Analytics account.
- Auth Code: Google requires an authetication code to enable access from the ElastiCube to data associated with a Google Analytics account (site name and profile IDs). To attain the Auth code click on the link Get Auth Code. The browser will open and you will need to sign in to your Google Analytics account. After signing in, click on the ‘Allow access’ button. This will generate a temporary code that you must paste into the Auth Code text box in the connection window.
- Date Range: Select the date range of the analytics data you require.
- Click Connect to display a list of available websites the list box below.
- Select the relevant website that you want to work with, and click OK.
- All tables and views associated with the website appear in a new window.
- Select the checkbox next to each table you want to use.
Existing relationships between tables can be automatically replicated in the ElastiCube by selecting the Automatically create relationships from database checkbox. Likewise fields with similar names can be linked by selecting the Automatically create relationships for fields with the same name checkbox.
- Once all relevant tables are selected, click Add.
See Customizing Google Analytics and AdWords Tables for in-depth info on controlling your Google Analytics tables.
Google Analytics applies sampling whenever more than 500,000 sessions are returned within a given query. For example, if we are asking for a 1-month time period that had 1,000,000 session in it, Google will apply sampling and we will only get 50% of the actual sessions. Whereas in some cases sampling might only slightly affect the results accuracy, it many cases it is crucial.
Sisense supports three configuration options to reduce the chances of sampling:
- Split Intervals – A Google Analytics table can be configured to be split into a number of given intervals. For example, if intervals=4, then a one month period will be split into 4 query requests equal in days.
- Day Intervals – A Google Analytics table can be configured to be split into multiple intervals where each is the size of the given number of days. For example, if day_intervals=10, then a 30 day time period will be split into 3 intervals.
- Segmenting Data – A segment is a subset of your data. You can use predefined segments to work around Google’s sampling limitations. For more information, see Segment Google Analytics Data.
Since Google limitations are applied separately per request, this reduces the risk of overall sampling.
Configuring Google Analytics sampling intervals
Edit the following xml file (if it doesn’t exist, create it):
The xml file needs to have a table node for each table, under a tables root:
<?xml version="1.0" encoding="utf-8" ?>
<table name="MyGoogleAnalyticsTable" days_interval="2" split_by="10"/>
For Split Intervals as described above use the “split_by” attribute. For Day Intervals use the “days_interval” attribute.
Note that only one of these attributes should be used. “split_by” will be used in case both are available.
Hey! Was this article helpful?
Questions? Ask the community.