0
我正在檢查示例谷歌分析Android應用程序,但沒有數據顯示在我的谷歌分析帳戶。這是我的代碼:谷歌分析不顯示任何數據
public class ClickTrackerActivity extends Activity {
GoogleAnalyticsTracker tracker;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Start your statistics tracking
tracker = GoogleAnalyticsTracker.getInstance();
tracker.startNewSession("UA-39298495-1", 30, this);
setContentView(R.layout.main);
tracker.trackPageView("/ClickTracker-Main-Screen");
}
@Override
protected void onDestroy() {
super.onDestroy();
tracker.stopSession();
}
public void onClickHighButton(View v) {
// High button clicked.
Toast.makeText(ClickTrackerActivity.this, "Chose the High Road", Toast.LENGTH_SHORT).show();
tracker.trackEvent("Clicks", "Button", "High Road", 0);
tracker.dispatch();
}
public void onClickLowButton(View v) {
// Low button clicked.
Toast.makeText(ClickTrackerActivity.this, "Chose the Low Road", Toast.LENGTH_SHORT).show();
tracker.trackEvent("Clicks", "Button", "Low Road", 0);
}
}
這可能是什麼原因?需要一段時間才能顯示數據?
您是否擁有正確的權限?如果是這樣,您可能只需在數據顯示之前稍等一下。 – 2013-03-15 11:00:49
我認爲數據開始顯示在分析數據中可能需要24-48小時 – Boardy 2013-03-15 11:07:48