String feedUrl;
feedUrl = "https://www.google.com/analytics/feeds/datasources/ga/accounts";
feedUrl = "https://www.google.com/analytics/feeds/datasources/ga/accounts/~all/webproperties";
feedUrl = "https://www.google.com/analytics/feeds/datasources/ga/accounts/~all/webproperties/~all/profiles";
URL queryUrl = new URL(feedUrl);
ManagementFeed feed = client.getFeed(queryUrl, ManagementFeed.class);
for (ManagementEntry entry : feed.getEntries()) {
System.out.println("--- Account Entry ---");
for (Property property : entry.getProperties()) {
System.out.println(property.getName() + ": " + property.getValue());
}
}
2011-08-10
Google Analytics API Notes
A general way to query Google Analytics API:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment