Google Analytics

Introduction

The Connector for Google Analytics gives developers easy access to Google Analytics data, including Traffic, Users, Referrals, Geo, Behavior, and more.

Connection String

Google Analytics uses the OAuth authentication standard. In addition to the connection string Parameters, the Callback URL also should be specified for this connector. Set the OAuth Properties (OAuth Client ID and OAuth Client Secret). Set the CallBack URL also for this Connector. Once the Callback URL is set the OAuthAccessToken will be generated in the Connection string when you verify the Connection the the VERIFY CONNECTION Button.

Connection String Parameters

Parameter Description
Profile The Google Analytics View (Profile). This can be set to either the Id or website URL for the Profile. If not specified, the first Profile returned will be used.
OAuthClientId The client Id assigned when you register your application with an OAuth authorization server.
OAuthClientSecret The client secret assigned when you register your application with an OAuth authorization server.
InitiateOAuth Set this property to initiate the process to obtain or refresh the OAuth access token when you connect.
OAuthRefreshToken The OAuth refresh token for the corresponding OAuth access token.

Connecting to Google Analytics

Google Analytics uses the OAuth authentication standard.

  1. Log in to https://console.developers.google.com to begin the process of finding your oauth token.

  2. Navigate to the library tab and select the ‘Analytics API’.

  3. In the top middle of the resulting dashboard, select ‘Enable’.

  4. Now navigate to the credentials tab and select drop down ‘Create Credentials’ in order to select ‘OAuth Client ID’.

  5. In the resulting form, select the ‘Web application’ form, and a meaningful name for your client ID. Set a callback URL if using in Authorized redirect URL Column and click create. The ‘Authorized redirect URI’ is important for Loome Integrate’s implementation.

  6. Hit submit and then copy the ‘Client ID’ string given to your connection string’s ‘OAuth Client Id’ and perform likewise with the ‘OAuth Client Secret’ value.

Data Migrations

To Check for the data migrations:

  1. Add a new connection in Loome Integrate as shown.

    • Go to tasks and click on Connections.

    • Add a new connection Using Add New Connection Option.

    • Choose GoogleAnalytics Connector from the available Connector Options.

  2. Using the connection string parameters created, Verify the connection using the VERIFY CONNECTION Option in Loome Integrate.

    After Clicking Verify Connection the OAuth Tokens are generated in the Connection String, You will be taken to the following Window. Choose the account, and give access by clicking on allow. You will be displayed with authorization successful window.

    Once the Connection is verified, Insert the Connection Using Insert Option.

  3. Create a Job Using ADD A JOB option in Loome Integrate, add a data migration task to the job.

  4. Create a New Task by right clicking job list and then Add a New Task Option. If you want to edit an Existing Task Use Edit Task.

  5. Choose a Data Migration Task.

  6. Choose the source and the destination for the migration of data. Name the Task.

  7. Choose the Tables or the data that need to be migrated from the source to the destination. You can Copy all Tables by checking Copy all tables box.

  8. Execute the Job. Check for results and the details of the data migrated in Execution History.

Data model

The Connector for Google Analytics 2016 models Google Analytics entities in relational Tables, Views, and Stored Procedures. The provided tables will give you an overview of your account information and the profiles available for Google Analytics queries.

Tables

The tables are normalized and contain an Id column, which is the primary key. This behavior is consistent across all tables in the product.

Name Description
Accounts Lists all Accounts to which the user has access.
Profiles Lists all Profiles to which the user has access.
Segments Lists all Segments to which the user has access.
WebProperties Lists Web Properties to which the user has access.

Views

Views are similar to tables in the way that data is represented; however, views do not support updates. Often, a stored procedure is available to update the data if such functionality is applicable to the data source.

Name Description
AdSense Retrieves AdSense data.
AdWords Retrieves AdWords data.
Ecommerce Retrieves Ecommerce data.
Events Retrieves Event data.
GoalCompletions Retrieves Goal Completion data.
SiteContent Retrieves internal Site Content data.
SiteSearch Retrieves internal Site Search data.
SiteSpeed Retrieves internal Site Speed data.
Traffic Retrieves all Traffic data.