Follow

Connect to Google Analytics with a CData source

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.

Add a CData data source

Set up Google Analytics

You can find the guide here.

Set up Google Analytics on a website

Additional information

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.

Google Analytics CData Datamodel

CData Setup

Add a CData data source and choose the Google Analytics provider.

The first step in setting up a CData connector should always be to click the ? in the top right corner.

Sp_rgsm_lstegn.PNG

Google Analytics guide from CData

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.

1_GA.PNG

Press Authorize OAuth when you have changed the Initiate OAuth and added the client/id.

First you will have to choose an account

2_GA.PNG

Then Allow, so that you can view and edit your google analytics data.

3_GA.PNG

Then you will get a success notification.

4_GA.PNG

When you close that window, you will notice that the CData data source setup has changed.

5_GA.PNG

It has received a OAuth Refresh Token and 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.

6_GA.PNG

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.

1.PNG

Paste in the query, give it a meaningful name and press Apply. After that it is a good idea to click on Validate.

2.PNG

Then you can synchronize and choose the view.

3.PNG

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.

4.PNG

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.