,應該幫助你:
現在又回到了這個Web應用程序的分析跟蹤,我使用由谷歌這裏提供的代碼。 所以代碼變得有點像這樣。
public class myWebApp extends Activity{
Webview mWebview;
GoogleAnalyticsTracker tracker;
protected void onCreate(Bundle savedInstanceState) {
tracker = GoogleAnalyticsTracker.getInstance();
// Start the tracker in manual dispatch mode. The following UA-xxxxxxx-x code must be replaced by //your web property ID.
tracker.startNewSession("UA-xxxxxxx-x", this);
mWebview = new WebView(this);
mWebview .setWebViewClient(new myWebViewClient());
mWebview .loadUrl("file:///android_asset/www/index.html");
private class myWebViewClient extends WebViewClient
{
//After the user visits a particular page, send the tracking notification to GoogleAnalytics.
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon)
{
tracker.trackPageView(mWebview.getUrl());
tracker.dispatch();
}
}
}
http://www.the4thdimension.net/2011/11/using-google-analytics-with-html5-or.html
而在谷歌分析的統計數據,你應該得到一些信息,至少約Android操作系統。
嗨,如果您使用webview查看已啓用跟蹤功能的網站,那麼受衆標籤下的移動報告不會足以滿足您的需求嗎?或者您正在尋找一些額外的數據? –
在分析中,我期望能夠在android webview應用程序與移動web瀏覽器用戶之間進行區分。 –