Click here to Skip to main content
15,890,579 members
Articles / Database Development / SQL Server / SQL Server 2014
Tip/Trick

Integrate Google Analytic Data to Local Database using SSIS

Rate me:
Please Sign up or sign in to vote.
4.67/5 (4 votes)
31 May 2015CPOL2 min read 22.1K   8   5
This process shows how you can integrate Google analytic data into your reporting server database in order to have daily reports and analysis to include data of your Google analytic account using a free available plugin for SQL Server Integration service called SSIS GoogleAnalyticsSource.

Introduction

As data analysts and business intelligence developers, it's part of your job to provide insights from all sources to your business. But when it comes to providing insights regarding your web sites, it can be really time consuming to login to your Google analytic account to retrieve data everyday. But thanks to a plugin called SSIS GoogleAnalyticsSource, you can create jobs to retrieve data to your local database from Google analytics.

This plugin is freely available on Codeplex.

Using the Code

Step 1

Go in to the below mentioned URL and download the SSIS GoogleAnalytics Source 2014.msi from the Codeplex web site.

Image 1

After downloading SSIS GoogleAnalytics Source 2014.msi, download dimension.xml and metric.xml.

Image 2

Step 2

Install the .msi file.

Step 3

Open SQL Server Data Tools for Visual Studio 2013 and create a new Integration Services project.

Step 4

First, add a data flow task to Control Flow as below image:

Image 3

Step 5

Double click on the data flow task and go inside it.

Now drag and drop GoogleAnalyticsSource component from SSIS toolbox - common section.

Image 4

Double click on the component and sign-in to your Google analytic account.

Image 5

Step 6

Click on the New button in front of the Dimension textbox, and give it the location of the Dimension.xml file you downloaded from the Codeplex project.

Image 6

Image 7

Step 7

Do the same way for Metrics text box as well.

Image 8

Step 8

Select the dimensions and metrics you prefer and press ok.

Image 9

Step 9

Add an OLE DB Destination component to insert data to the database and select the relevant table you need this information to be inserted.

Image 10

Image 11

Step 10

Now run the package:

Image 12

Step 11

Run a select query on the database and see whether data has been retrieved properly.

Image 13

Points of Interest

Using SQL Server agent job, we can schedule these packages to run on a periodic basis to capture data from the Google analytic which can be then later used to create relevant analytic work and reports.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Sri Lanka Sri Lanka
Software engineer with 3+ years of experience in the IT industry working for reputed local and international companies. Currently pursing a career in Data Warehouse and Business Intelligence field while having special interests in the areas of Pattern Recognition, Bioinformatics and Statistical Data Analysis. Reading for Msc in Data Science, Engineering and Analytic at University of Moratuwa - Sri Lanka.

Comments and Discussions

 
QuestionHow to get traffic channel names from google analytics using C# Pin
Member 1161847412-Sep-19 2:39
Member 1161847412-Sep-19 2:39 
QuestionNot working for me Pin
SQLDaddy114-Jan-16 5:25
SQLDaddy114-Jan-16 5:25 
QuestionUpperCased string data upon insert into the table in the database. Please help!!! Pin
Member 1175655010-Jun-15 7:28
Member 1175655010-Jun-15 7:28 
QuestionCompatibility with SQl Server 2008 Pin
Sumit Kadam7-Jun-15 23:38
Sumit Kadam7-Jun-15 23:38 
AnswerRe: Compatibility with SQl Server 2008 Pin
Asanka Perera8-Jun-15 19:56
Asanka Perera8-Jun-15 19:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.