Connecting to Google Analytics
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 authentication 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.
See Customizing Google Analytics and AdWords Tables for in-depth info on controlling your Google Analytics tables.
Avoiding Sampling in Google Analytics
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:
While these configuration options may reduce the chances that Google samples your data, Sisense cannot guarantee that your data will not be sampled as the data is extracted from Google.
- 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.
It is easy to estimate the amount of sessions your account generates from your Google Analytics account: