Google Analytics ODBC driver Getting Started Guide
- Installing the Google Analytics ODBC driver
- Creating a Google Service Account
- Configuring an ODBC data source
- Connecting your application to Google Analytics
Creating a Google Service Account
You need to create a Google Service Account in the Google console to use the Google Analytics ODBC driver.
- In the Google Developers Console, create a new project.
- Choose the menu button in the top-left corner of the Google Developers Console, expand APIs & Services and choose Library.
- Choose the Google Analytics API tile.
- Choose Enable to turn on the Google Analytics API.
- In the Google Developers Console, create a Service Account.
- Copy the Service Account email address as you'll need to add this user in your Google Analytics account.
- Add a new key for the service account. Choose a JSON key type.
- Download the certificate to the machine where you'll install the Google Analytics ODBC driver.
- Sign into your Google Analytics account.
- Grant the Read & Analyze permission to a new user whose email address is the one you created in the Google Developers Console.
Installing the Google Analytics ODBC driver
- Download the Google Analytics ODBC driver for your Windows platform.
-
Install and license the Google Analytics ODBC driver on the machine where your client application is installed.
For example, if you want to analyse Google Analytics data in Excel, install the Google Analytics ODBC driver on the machine where Excel is installed.
To do this, execute the file distribution that you downloaded in the previous step, and follow the on screen instructions.
The install program starts the Easysoft License Manager, because you cannot use your Easysoft product until a license is obtained.
The following types of license are available:
- Free time-limited trial license, which gives you free and unrestricted use of the product for a limited period (usually 14 days).
- Full license if you have purchased the product. On purchasing the product, you are given an authorization code, which you use to obtain a license.
- In Easysoft License Manager, enter your details.
Complete the Name, E-Mail Address, and Company fields.
The E-Mail Address must be the same as the address used to register and download from the Easysoft web site or you will be unable to obtain trial licenses.
- Choose Request License.
You're asked for a license type.
- Do one of the following:
- For a trial license, choose Time Limited Trial and then choose Next.
The License Manager asks what software you are licensing. Select your product from the drop-down list and then choose Next.
- If you have obtained an authorization code for a purchased license, select Non-expiring License and then choose Next.
The License Manager requests your authorization code.
Enter the authorization code and then choose Next.
- For a trial license, choose Time Limited Trial and then choose Next.
- The License Manager displays a summary of the information you entered and allows you to choose the method of applying for your license.
- Do one of the following:
- Choose On-line Request if your machine is connected to the internet and can make outgoing connections to port 8884.
The License Manager then sends a request to the Easysoft license server to activate your license key automatically. This is the quickest method and results in your details being entered immediately into our support database.
- The remaining three options (Email Request, Print Request, and View Request) are all ways to obtain a license if your machine is off-line (does not have a connection to the internet).
Each of these methods involves providing Easysoft with information including your machine number (a number unique to your machine) and then waiting to receive your license key.
Instead of emailing your details to Easysoft, you can enter them directly at the Easysoft web site and your license key will be emailed to you automatically.
To use this method, choose View Request, and then visit:
In the licensing page, enter your machine number (and authorization code for a purchased license), choose Submit and your license key will be emailed to you.
When you receive the license key, you can activate it either by double-clicking the email attachment or by choosing Enter License on the License Manager main screen and pasting the license key into the dialog box.
- Choose On-line Request if your machine is connected to the internet and can make outgoing connections to port 8884.
- Choose Finish to exit the License Manager.
The installation is complete.
Configuring an ODBC data source
Before you can use the Google Analytics ODBC driver to connect your application to Google Analytics, you need to configure an ODBC data source. An ODBC data source stores the connection details for the target database (in this case, Google Analytics) and the ODBC driver that's required to connect to it (in this case, the Google Analytics ODBC driver).
You configure ODBC data sources in ODBC Data Source Administrator, which is included with Windows.
There are two versions of ODBC Data Source Administrator on this platform. The version of ODBC Data Source Administrator that you need to run depends on whether the application you want to connect to Google Analytics is 32-bit or 64-bit. For the applications covered in this article, refer to the following table to find out the application's architecture.
Application | Notes |
---|---|
Excel | There is both a 32-bit and a 64-bit version of Excel. To find out which version of Excel you have, start Excel, and then start Windows Task Manager. In Task Manager, choose the Processes tab. Look for Excel.exe in the list. If this process name is followed by *32 , your version of Excel is 32-bit. Otherwise, your version of Excel is 64-bit. |
If you have a 64-bit application, you need to run 64-bit version of ODBC Data Source Administrator. To do this, open Administrative Tools in Control Panel, and then open Data Sources (ODBC). (On Windows Server 2003 and earlier, the Control Panel applet that launches ODBC Data Source Administrator is labelled Data Sources. On Windows 8 and later, the Control Panel applet is labelled ODBC Data Sources (64-bit).)
If you have a 32-bit application, you need to run 32-bit version of ODBC Data Source Administrator. To do this, in the Windows Run dialog box, enter:
%windir%\syswow64\odbcad32.exe
Use ODBC Data Source Administrator to create a Google Analytics ODBC driver data source:
- Choose the System DSN tab, and then choose Add.
- In the Create New Data Source dialog box, choose Easysoft ODBC-Google Analytics Driver, and then choose Finish.
-
Complete these fields in Easysoft ODBC-Google Analytics Driver DSN Setup dialog box:
Setting Value DSN Analytics
Description Easysoft Google Analytics Driver
- Enter the full path to the Service Account certificate (JSON format) you created earlier, in the Service Acct File.
- Use the Test button to verify that you can successfully connect to Google Analytics.
Connecting your application to Google Analytics
Connecting Excel to Google Analytics
Follow these steps to return data from Google Analytics to Microsoft Excel by using the Data Connection Wizard:
-
Do one of the following:
- For Excel 2007 and later, on the Data tab, in the From Other Sources group, choose Data Connection Wizard.
- For Excel 2003 and earlier, on the Data menu, choose Import External Data, and then choose Import Data.
- For Excel 2003 and earlier, in the Select Data Source dialog box, choose New Source. For Excel 2007 and later, skip this step.
- In the Data Connection Wizard, choose ODBC DSN from the list, and then choose Next.
- Choose your Google Analytics ODBC driver data source from the list, and then choose Next.
- Choose the table that contains the data you want to retrieve, and then choose Next.
- Name and describe your new Data Connection File, and then choose Finish.
- In the Select Data Source dialog box, open your new Data Connection File.
- In the Import Data dialog box choose the destination cell and worksheet for the data, and then choose OK to return your data to Excel.
Follow these steps to return data from Google Analytics to Microsoft Excel by using Microsoft Query:
-
Do one of the following:
- For Excel 2007 and later, on the Data tab, in the From Other Sources group, choose From Microsoft Query.
- For Excel 2003 and earlier, on the Data menu, choose Import External Data, and then choose New Database Query.
The New Database Query command uses Microsoft Query to import data. Microsoft Query is an optional feature, which by default is not installed. If you do not have Microsoft Query installed, choosing New Database Query will prompt you to install it. To do this, in Control Panel, choose Programs and Features (or Add or Remove Programs). Choose Microsoft Office (if you installed Excel as part of Office) or Microsoft Excel, and then choose Change. Follow the instructions on screen. Select Choose advanced customization of applications during the Setup wizard if this option is present for your version of Office or Excel. Microsoft Query is located under Office Tools.
When you have installed Microsoft Query, repeat step 1.
- In the Choose Data Source dialog box, choose your Google Analytics ODBC driver data source from the list, and then choose OK.
- In the Query Wizard, choose the columns that contain the data you want to retrieve, and then choose Next.
- If you want to return a subset of the data, use the Filter Data screen to filter the results of your query (this is the equivalent of a SQL
WHERE
clause), and then click Next. - If you want to change the sort order of your data, use the Sort Order screen to sort the results of your query (this is the equivalent of a SQL
ORDER BY
clause), and then click Next. - Click Finish to return your Google Analytics data to Excel.