简体   繁体   English

Google Analytics API DataQuery对象

[英]Google Analytics API DataQuery object

I am new to Java and to the Google Analytics API. 我是Java和Google Analytics(分析)API的新手。 I am using Eclipse Kepler Service Release 1. I want to write a small console program in java that will read the output from another program(Start Date and End Date) from a console and query Google Analytics to return some Event Labels and write them to a csv. 我正在使用Eclipse Kepler Service Release1。我想用Java编写一个小型控制台程序,该程序将从控制台读取另一个程序(开始日期和结束日期)的输出,并查询Google Analytics(分析)以返回一些事件标签并将其写入CSV。

I am having trouble getting started though. 我在上手时遇到了麻烦。 Google's getting started tutorial is not that helpful and also I can't figure out how to add jars from the API to my solution. Google的入门教程并没有帮助,而且我也想不通如何从API向我的解决方案添加jar。 I'm trying to use a DataQuery object because that is how the tutorial suggests you start, but I am pretty sure the object is not in any of the jar files that come with the Google Analytics API. 我正在尝试使用DataQuery对象,因为这是本教程建议您开始的方式,但是我很确定该对象不在Google Analytics API附带的任何jar文件中。

I think they are in the Core Reporting API. 我认为它们在Core Reporting API中。 I installed the Google API plugin for eclipse but the Core Reporting API is not listed and I cannot find a download for it online. 我安装了用于eclipse的Google API插件,但未列出Core Reporting API,并且无法在线下载该文件。

Does anyone know how to download the Core Reporting API or if this is even the correct place to start? 有谁知道如何下载Core Reporting API,或者这是否是正确的开始位置?

Does anyone have any good examples of a Java program that does something similar that they are willing to share? 有没有人有一个Java程序的好例子,他们愿意分享相似的东西?

This tutorial of google having full java example you can customize it for different data queries https://developers.google.com/analytics/devguides/reporting/core/v2/gdataJava Google的本教程具有完整的Java示例,您可以针对不同的数据查询自定义它https://developers.google.com/analytics/devguides/reporting/core/v2/gdataJava

This is query explorer tool provided by google 这是Google提供的查询浏览器工具

http://ga-dev-tools.appspot.com/explorer/ http://ga-dev-tools.appspot.com/explorer/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM