We have a new community! Please visit support.timextender.com
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.

Update - Since version 19.11.5 there have been some changes in how we authorize the CData providers.

Contents

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

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.

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.

mceclip0.png

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

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 is the same.

mceclip0.png

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.

mceclip3.png

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

Helpful links

For more info about what queries you can make look here in the CData Guide

CData SQL Overview

CData Advanced Queries

Google also have a tool that can be used to see some metrics with called Query explorer.

Google Analytics Dimensions & Metrics Explorer

Google Analytics Query Explorer

 

 

Was this article helpful?
1 out of 1 found this helpful

0 Comments

Please sign in to leave a comment.