How to get access to google analytics data API using Pentaho PDI (Kettle version 4.2.1)

When I use the Google Analytics Input Step, all I have to enter is my account username and password for the Authorization. From there, the step looks up the Domain Table ID for me. So by just giving this step my username and password, choosing the id and the metrics, I am able to retrieve all of the information I need--no other authorization required.

However, I am trying to recreate this by using the HTTP Client Lookup step (with a Generate Rows step before it). I gave it the following URL, as described by{*My Domain Table ID*}&start-date=2010-08-01&end-date=2012-04-01&metrics=ga:newVisits

and filled in the Http Login and Http Password fields with my username and password (exactly same as in Google Analytics Input step), respectively. However, when I preview the results of this HTTP Client step, the transformation returns an error that says that Login is required.

I have also tried this with the REST Client Lookup Step (with a Generate Rows step before it). I chose the GET HTTP method, the JSON application type, and filled in my HTTP Login and password for authentication. When I try to run this, it does not return an error, but in the result field of the preview output it says "Invalid Credentials."

What is the Google Analytics Input Step doing differently from the HTTP Client Lookup and REST Client Lookup steps? And how do I access the same information using those lookup steps?

I want to be able to access API's from other web sites as well, not just from Google Analytics, so it is important for me to be able to do this for any API.

Any help appreciated!

-------------Problems Reply------------

I have made ​​a request to google analytics using HTTP client step, and it works perfect.

First, you need a token from Google Analytics:[email protected]&Passwd=xxxxxxx&service=analytics

This token is a long string.

The token is going to step client as HTTP header. The parameter must be called: Authorization = token

Others parameters: GData-Version=3.

After you add the request parameters. (ids, start-date, end-date, metrics, filter, segment)

You also have to add the key to your profile id, as the last parameter.

This request returns a XML. Use XML parser step to get metrics value.

which Kettle version are you using? as far as i know there are some changes in google api

read this bug report:

Category:web services Views:0 Time:2012-04-04

Related post

  • Filtering by country using Google Analytics Data API 2009-06-17

    I'm trying to use the Google Analytics Data API to get data filtered by country. I am using the .NET library at which works beautifully as long as I don't try to filter by country. This works fine: const

  • Google Analytics Data API [C# Design] 2009-07-08

    I'm currently building a library around the Google Analytics Data Export API. When i'm requesting data for a specific profile, this is the response from Google: <entry> <id>

  • connecting google analytics data api to dojo charts - php backend 2010-10-19

    I'm looking at feeding dojo charts with data from google analytics, within a Zend Framework app. Has anyone done this or have any overview as to how I would go about it? I see there is a Does it make sense to have a dojo

  • include extra argument to callback in google analytics data api 2011-02-25

    Consider example code from google analytics api docs: function getDataFeed() { var myFeedUri = '' + '?start-date=2009-04-01' + '&end-date=2009-04-30' + '&dimensions=ga:pageTitle,ga:pagePath' + '&

  • How to fetch custom variable value in google analytics data api? 2011-07-28

    'm using GAPI version 1.3 I have added a custom variable in GA code like this: **_gaq.push(['_setCustomVar', 1, 'Member', '<?php echo $member_id; ?>, 3]);** And its working fine.. Now I need to fetch the data from GA: so my request to GA is lik

  • Is it possible to give a 3rd party access to my google analytics data 2014-12-08

    I host my own trading site but use a 3rd party for backend processing - Inventory / Order Management. The 3rd party would like to access my google analytics data to allow them to create some reports. I have looked at the GA terms of service but canno

  • How to get Google Analytics data using OAuth? 2011-02-15

    Hy guys, we are developing a system which will provide users with access to Google Analytics. I'm trying to implement it in the way so user don't need to enter their Google login credentials on our site, so trying to get it work using their login. I

  • How can we access specific Google Analytics account data using API? 2012-03-25

    We're developing a web application that allows clients to create and display products. We'd like to provide our clients with metrics from our Google Analytics account regarding their products in their administration panel. Unfortunately, the GA API d

  • Using Google Analytics (G)API and Google Visualization - Showing data, but from the wrong month 2011-03-29

    I finally wrote a script to get Google Analytics data then insert it into the Google Visualization API to create a graph like on the actual GA website. But for some reason the results on the graph are perfectly right, but the date associated with the

  • How do i retrieve google analytics data into my android application? 2012-04-13

    Hi I try to retrieve google analytics data... i got till access token using this REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"... im not getting any error but i dono further implementation... now i got access token, applications says "please copy this c

  • Creating an Interactive bar Chart out of Google Analytics Data 2010-07-29

    I want to make a bar chart from the google analytics data. Current implemetation of the bar chart in my site is by See Analytics I am developing an ASP.NET website and this See Analytics is using PHP and jQuery to conjure the chart. It is also paid.

  • zend framework & google analytics data 2011-06-07

    How can I use zend framework to export google analytics data into my application? I've used other Zend_Service_GData before, but can't find any documentation how to apply it to google analytics? Is this possible? --------------Solutions-------------

  • which method is best to export google analytics data into my custom dashboard 2011-09-05

    I want to create my custom dashboard for my site where i show all the google analytics data in custom view. but i'm very confused about google api. i'm using symfony framework to create this dashboard. so, which code api is most popular and sufficien

  • Google Analytics Data from Console App with C# 2012-04-16

    I am trying to write a service that will pull Google Analytics data via a windows service or a console app. No matter what I try, I am unable to authorize my app using oAuth I can do something like this var analyticsService = new AnalyticsService("My

  • Using the Google Analytics Export API to get a websites trend 2011-01-06

    i am working on an application that uses the Google Analytics Export API and i am trying to get the "Trend" result that Google shows against each of your site accounts as a percentage ie UP 35.04% or DOWN 16.02% How/where do they get this figure and

  • How to relate ga:campaign and ga:pagePath (content) on Google Analytics Export API? 2009-06-25

    Using custom reports you are able to drill down on a specific campaign and then choose the Landing Page or content page that the individual visitor choose. When I try to retrieve the same information through the Google Analytics Export API, I get an

  • Integrating Google Maps Data API with iPhone and performing search 2010-08-02

    Has anyone integrated Google's Maps Data API available here, with iPhone application. If so can you please share the skeleton code to get an head start in my application? I want to search some nearby places (for user information e.g. park, theatre, e

  • Google Contacts Data API on Android not working? 2011-09-09

    I try to use Google Contacts Data API on Android and more specifically the ContactsService class but the application crash as soon as I try to instantiate ContactsService class. I do not have this problem with a normal Java application. For example,

  • Sync from Android phone's calendar to Google Calendar on web without using Google Calendar Data API. Is this possible? 2012-01-12

    From the Google Calendar Help document on the web, it is stated that:: Is Google Calendar for mobile devices in sync with Google Calendar? Answer: Yes. Changes made in Google Calendar when accessed from your computer will be reflected in Google Calen

Copyright (C), All Rights Reserved.

processed in 0.205 (s). 11 q(s)