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.

  1. Click Add Data in the top menu of the ElastiCube Manager.
  2. Under the Web Services category, select Google Analytics.

Add Google Analytics

  1. 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.

Add Google Analytics_2

  1. Click Connect to display a  list of available websites the list box below.
  2. Select the relevant website that you want to work with, and click OK.
  3. All tables and views associated with the website appear in a new window.
  4. 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.

  1. 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.

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.
  1. 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.
  2. 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.
  3. 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):

%appdata%\Sisense\PrismServer\LocalRepository2.0\Resources\Analytics\GAnalytics.Tables.xml

The xml file needs to have a table node for each table, under a tables root:

<?xml version="1.0" encoding="utf-8" ?>

<tables>  

  <table name="MyGoogleAnalyticsTable" days_interval="2" split_by="10"/>

</tables>

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:Google Analytics Sessions