Google Analytics ODBC Driver Getting Started Guide

Creating a Google Service Account

You need to create a Google Service Account in the Google console to use the Google Analytics ODBC driver.

  1. In the Google Developers Console, create a new project.
  2. Choose the menu button in the top-left corner of the Google Developers Console, expand APIs & Services and choose Library.
  3. Choose the Google Analytics API tile.
  4. Choose Enable to enable the Google Analytics API.
  5. In the Google Developers Console, create a Service Account.
  6. Copy the Service Account email address as you will need to add this user in your Google Analytics account.
  7. Add a new key for the service account. Choose a JSON key type.
  8. Download the certificate to the machine where you will install the Google Analytics ODBC driver.
  9. Sign into your Google Analytics account.
  10. 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

  1. Download the Google Analytics ODBC driver for your Windows platform. (Registration required.)
  2. 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 the Google Analytics ODBC Driver 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
  3. In Easysoft License Manager, enter your details.

    You MUST enter 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.

  4. Choose Request License.

    You are asked for a license type.

  5. Do one of the following:
    • For a trial license click Time Limited Trial and then click Next.

      The License Manager asks what software you are licensing. Select Easysoft ODBC-Google Analytics Driver from the drop-down list and then click Next.

    • If you have obtained an authorization code for a purchased license, select Non-expiring License and then click Next.

      The License Manager requests your authorization code.

      Enter the authorization code and then click Next.

  6. The License Manager displays a summary of the information you entered and allows you to choose the method of applying for your license.
  7. 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 (i.e. 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, click View Request, and then visit:

      In the Licensing page, enter your machine number (and authorization code for purchased license), click 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 clicking Enter License on the License Manager main screen and pasting the license key into the dialog box.

    • 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 (e.g. Google Analytics) and the ODBC driver that is required to connect to it (e.g. the Google Analytics ODBC driver).

You configure ODBC data sources in ODBC Administrator, which is included with Windows. How you run ODBC Administrator depends on whether your version of Windows is 32-bit or 64-bit:

Use ODBC Administrator to create a Google Analytics ODBC Driver data source:

  1. Choose the System DSN tab, and then choose Add.
  2. In the Create New Data Source dialog box, choose Easysoft ODBC-Google Analytics Driver, and then choose Finish.
  3. Complete these fields in Easysoft ODBC-Google Analytics Driver DSN Setup dialog box:
    Setting Value
    DSN Analytics
    Description Easysoft Google Analytics Driver
  4. Enter the full path to the Service Account certificate (JSON format) you created earlier, in the Service Acct File.
  5. 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:

  1. 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.
  2. For Excel 2003 and earlier, in the Select Data Source dialog box, choose New Source. For Excel 2007 and later, skip this step.
  3. In the Data Connection Wizard, choose ODBC DSN from the list, and then choose Next.
  4. Choose your Google Analytics ODBC driver data source from the list, and then choose Next.
  5. Choose the table that contains the data you want to retrieve, and then choose Next.
  6. Name and describe your new Data Connection File, and then choose Finish.
  7. In the Select Data Source dialog box, open your new Data Connection File.
  8. 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:

  1. 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 / Excel. Microsoft Query is located under Office Tools.

    When you have installed Microsoft Query, repeat step 1.

  2. In the Choose Data Source dialog box, choose your Google Analytics ODBC driver data source from the list, and then choose OK.
  3. In the Query Wizard, choose the columns that contain the data you want to retrieve, and then click Next.
  4. 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.
  5. 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.
  6. Click Finish to return your Google Analytics data to Excel.