We have a custom data source that can connect to google analytics, but only if you pay for that specific driver. Now we provide google analytics as part of the 90+ CData connector bundle.
Before you attempt this you need to add the Google Analytics provider to your list of available sources.
Go through this guide before you start.
Update - Since version 19.11.5 there have been some changes in how we authorize the CData providers.
Set up Google Analytics
You can find the guide here.
The data you connect to is similar to a cube in structure. It is based of dimensions and metrics. So when you choose a table it may be empty until you run a specified query against it. You have the option of using 7 dimensions and 10 metrics in a query.
You can read about the data model here.
When you know how to add a CData data source, add a Google Analytics provider.
The first step in setting up a CData connector should always be to click the ? in the top right corner.
Fill out the following fields:
Initiate OAuth: REFRESH
OAuth Client ID: xxxxxxxxxxxx
Add the client id you got when you sat up google analytics
OAuth Client Secret: xxxxxxxxxxxx
Add the secret you got when you sat up google analytics.
Consider changing the OAuth Settings Location from the default AppData folder to a specified path. Especially if you use scheduled executions. It only exist in the folder for the user that initially created this file, so be sure that all other accounts looks at the same location.
Press Authorize OAuth when you have changed the Initiate OAuth and added the client/id.
First you will have to choose an account
Then Allow, so that you can view and edit your google analytics data.
Then you will get a success notification.
When you close that window, you will notice that the CData data source setup is the same.
It has received a OAuth Refresh Token and stored it in the OAuth Settings Location file. It will refresh this file every hour or when you execute tables or synchronizes.
If you test the connection, it now is successful.
If you have a lot of accounts, you can choose to only look at one of them, by adding a profile.
Now you can synchronize the data source to see the data.
Using the data
As stated before you won't get a lot of info from Google Analytics without making some specified queries.
As a example i have this query I want to use
SELECT Country, AdClicks FROM AdWords WHERE Country='United States'
To use it simply go to the Data Source Settings menu and add a new query table.
Paste in the query, give it a meaningful name and press Apply. After that it is a good idea to click on Validate.
Then you can synchronize and choose the view.
If you want to use a data selection rule instead of a where clause, you can do this. You just remove the where clause, synchronize and add it like below instead.
For more info about what queries you can make look here in the CData Guide
Google also have a tool that can be used to see some metrics with called Query explorer.