Pentaho Data Integration : Google Analytics

Google Analytics service provide details about a website's traffic. This service track various statistics and can be integrated with AdWords to review online campaigns.

Pentaho Google Analytics step allows to extract Google Analytics data.
Stepwise illustration given below.

Step 1

Enable Google Analytics and generate API key.



  1. Log into http://developers.google.com using gmail id.
  2. Click on API Console.
  3. Enable Analytics API.
  4. Copy API key from API access tab.

Step 2

Create a sample transformation.
Drag "Google Analytics" step into the transformation canvas.


Step 3

Configure Google Analytics step.





















Connection Settings

  • Application Name : Leave as default value "type-exit.org kettle plugin"
  • Email : Google account user id
  • Password : Google account password
  • API Key : API key from step 1.

Click on "Get Profiles" button to populate table id from profile.

Query Definition

  • Start Date ( YYYY-MM-DD )  : Data extract start date.
  • End   Date ( YYYY-MM-DD ) : Data extract End date.
  • Filters : Selection criteria filter for the data extract.
  • Sort : Sort by field.

  • Dimensions : Dimensions to query on.
Here are some of the commonly used dimensions.

  1. ga:continent
  2. ga:subContinent
  3. ga:country
  4. ga:region
  5. ga:metro
  6. ga:city
  7. ga:latitude
  8. ga:longitude
  9. ga:networkDomain
  10. ga:visitorType
  11. ga:visitCount
  12. ga:daysSinceLastVisit

  • Metrics  : Measures to retrieve.
 Here are some of the commonly used metrics.

  1. ga:visitors
  2. ga:newVisits
  3. ga:percentNewVisits
  4. ga:pageviews
  5. ga:pageviewsPerVisit
  6. ga:uniquePageviews
  7. ga:timeOnPage
  8. ga:avgTimeOnPage
  9. ga:exits

Step 4

Preview data.



Step 5

Specify output file or table.











Step 6

Execution results given below.








2014/03/12 12:58:05 - Spoon - Asking for repository
2014/03/12 12:58:05 - Version checker - OK
2014/03/12 14:14:41 - Spoon - Transformation opened.
2014/03/12 14:14:41 - Spoon - Launching transformation [tr_google_analytics_sample]...
2014/03/12 14:14:41 - Spoon - Started the transformation execution.
2014/03/12 14:14:41 - tr_google_analytics_sample - Dispatching started for transformation [tr_google_analytics_sample]
2014/03/12 14:14:43 - Google Analytics.0 - Finished processing (I=0, O=0, R=0, W=32, U=0, E=0)
2014/03/12 14:14:43 - write_analytics_out.0 - Finished processing (I=0, O=33, R=32, W=32, U=0, E=0)
2014/03/12 14:14:43 - Spoon - The transformation has finished!!

0 comments :

Post a Comment

UA-46724997-1