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("MyApp");
const string baseUrl = "https://www.google.com/analytics/feeds/data";
var dataQuery = new DataQuery(baseUrl);
dataQuery.Ids = TableId;
dataQuery.Dimensions = "ga:pagePath,ga:date";
dataQuery.Metrics = "ga:avgTimeOnPage,ga:pageviews,ga:uniquePageviews";
dataQuery.Sort = "ga:date";
dataQuery.GAStartDate = "2012-03-01";
dataQuery.GAEndDate = "2012-04-15";
Feed = analyticsService.Query(dataQuery);
This works fine if I use GDataCredentials with my account username/pw. I was under the impression that this only gives me 200 requests a day. I really need help with some example code how to make it work with oAuth to allow for 50K requests. I am totally hitting the wall here.
Just to Clarify:
I have a single GoogleAnalytics account for my site. I will always be pulling from that one account. What is the easiest way to do it, without hitting the low API limits?
Thanks a lot in advance!