android - 每10分钟如何将数据发送到Google Analytics(分析)?

标签 android google-analytics

我不想立即将数据发送到google-analytics。我想在android中每隔10分钟定期将数据发送到它。如何实现。

最佳答案

我不是应用程序程序员,但是according to the documentation数据在任何情况下都仅每30分钟发送一次(不是立即发送)。

同样,调度期似乎可以通过多种方式配置:

// Set the dispatch period in seconds.
GoogleAnalytics.getInstance(this).setLocalDispatchPeriod(30);

//To set the dispatch period in the XML configuration file:
<integer name="ga_dispatchPeriod">30</integer>

Setting a zero or negative value will disable periodic dispatch, requiring that you use manual dispatch if you want to send any data to Google Analytics.

// Disable periodic dispatch by setting dispatch period to a value less than 1.
GoogleAnalytics.getInstance(this).setLocalDispatchPeriod(0);

关于android - 每10分钟如何将数据发送到Google Analytics(分析)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36444212/

相关文章:

google-analytics - Google Analytics 过滤器 'Ashburn' 在 View 中不起作用

javascript - 跟踪点击链接时是否存在竞态条件?

javascript - 延迟运行跟踪代码好吗

android - 滚动向 TextView 添加值

android - 从 ListView 中的评分栏刷新星星颜色

google-analytics - 在Google Analytics(分析)中,如何自定义不同页面的数据?

ios - AIR for iOS 和谷歌分析

java - retrofit 动态响应体

java - Android 在 Fragment 之间传递数据

java - JSON 数据错误 Android 非法参数 HttpClient