This article should give you guide on how to perform Google analytics data import to database/database storage without need of programming. Why should we want something like that? Maybe because we need to create our own reports or combine Google analytics data with data from other source systems – for example internal factory systems.
This is a guide for technically advanced colleagues. But with a bit of trying, anyone can get this done. Whole solution can be also used for automatic data download on daily (or different) basis. If you get stuck, feel free to text me and I will be happy to help.
GA Import into a dtabase using SSIS – what will we need:
- SQL Server database (for example Express) – more in article SQL Server Express 2014 Installation
- Visual studio for data tools – requirements for download from Microsoft web are here
- SSIS connector for connection to Google analytics account – I will use perfectly made connector by Kingswaysoft
Steplist – Import Google analytics
1) Launch Visual studio for data tools and create Integration services project
2) Set connection to SQL database using connection manager. We will save data into SQL database later on. Fill in the name of the server and select database.
3) Select data flow task from SSIS toolbox and drag the component with mouse to work space. Then click twice on data flow task and open it.
4) You should see Google analytics connector in SSIS Toolbox area after installing Kingswaysoft connector. Drag it to data flow and set connector after double click. You will connect to your google analytics account through update token. Then set date from/till and also what do you want to download. In my case, I am interested in
- metrics – new users, sessions and page views
- dimensions – city, date
5) Last step is setting a destination where the data should be uploaded. We set the connection to database in step 3- We will use it now. Select component OLE DB Destination from SSIS toolbox and set is as shown in the picture.
6) The whole work can be launched now and the result should be this:
7) In database, we can make sure that the data were really imported