当前位置: 首页>>代码示例>>Java>>正文


Java Tracker.set方法代码示例

本文整理汇总了Java中com.google.analytics.tracking.android.Tracker.set方法的典型用法代码示例。如果您正苦于以下问题:Java Tracker.set方法的具体用法?Java Tracker.set怎么用?Java Tracker.set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.analytics.tracking.android.Tracker的用法示例。


在下文中一共展示了Tracker.set方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: trackView

import com.google.analytics.tracking.android.Tracker; //导入方法依赖的package包/类
private void trackView(String screenname, CallbackContext callbackContext) {
if (! trackerStarted ) {
           callbackContext.error("Tracker not started");
    return;
}

       Tracker tracker = GoogleAnalytics.getInstance(this.cordova.getActivity()).getDefaultTracker();
       addCustomDimensionsToTracker(tracker);
       
       if (null != screenname && screenname.length() > 0) {
           tracker.set(Fields.SCREEN_NAME, screenname);
           tracker.send(MapBuilder
             .createAppView()
             .build()
           );
           callbackContext.success("Track Screen: " + screenname);
       } else {
           callbackContext.error("Expected one non-empty string argument.");
       }
   }
 
开发者ID:psydrake,项目名称:pandacoinBalance,代码行数:21,代码来源:UniversalAnalyticsPlugin.java

示例2: onStart

import com.google.analytics.tracking.android.Tracker; //导入方法依赖的package包/类
@Override
public void onStart() {
	super.onStart();
	final Tracker tracker = EasyTracker.getInstance(getActivity());
	tracker.set(Fields.SCREEN_NAME, "Recipes list");
	tracker.send(MapBuilder.createAppView().build());
	IntentFilter intentFilter = new IntentFilter();
	intentFilter.addAction(RecipesManager.ACTION_FINISH_LOADING_RECIPES);
	intentFilter.addAction(RecipesManager.ACTION_START_LOADING_RECIPES);

	if (RecipesApplication.isLoadingRecipes) {
		getActivity().setProgressBarIndeterminateVisibility(true);
	} else {
		getActivity().setProgressBarIndeterminateVisibility(false);
	}
	LocalBroadcastManager.getInstance(getActivity()).registerReceiver(broadcastReceiver,
			intentFilter);
}
 
开发者ID:groupsky,项目名称:android-recipes-app,代码行数:19,代码来源:RecipeItemListFragment.java

示例3: addCustomDimensionsToTracker

import com.google.analytics.tracking.android.Tracker; //导入方法依赖的package包/类
private void addCustomDimensionsToTracker(Tracker tracker) {
	for (Entry<String, String> entry : customDimensions.entrySet()) {
		String key = entry.getKey();
		String value = entry.getValue();
	    //System.out.println("Setting tracker dimension slot " + key + ": <" + value+">");
	    tracker.set(Fields.customDimension(Integer.parseInt(key)), value);
	}
}
 
开发者ID:psydrake,项目名称:pandacoinBalance,代码行数:9,代码来源:UniversalAnalyticsPlugin.java

示例4: onStart

import com.google.analytics.tracking.android.Tracker; //导入方法依赖的package包/类
@Override
public void onStart() {
	super.onStart();
	final Tracker tracker = EasyTracker.getInstance(getActivity());
	tracker.set(Fields.SCREEN_NAME, "Recipe Details");
	tracker.send(MapBuilder.createAppView().build());
}
 
开发者ID:groupsky,项目名称:android-recipes-app,代码行数:8,代码来源:RecipeItemDetailFragment.java

示例5: trackAnalytics

import com.google.analytics.tracking.android.Tracker; //导入方法依赖的package包/类
private void trackAnalytics() {
    EasyTracker.getInstance().setContext(this);
    Tracker tracker = EasyTracker.getInstance().getTracker();

    if (mPhotoUser != null) {
        tracker.set("&uid", mPhotoUser.id.toString());
    } else {
        tracker.set("&uid", null);
    }

    if (mPhoto != null) {
        tracker.trackView("image/" + mPhoto.id);
    }
}
 
开发者ID:vicfryzel,项目名称:gplus-photohunt-client-android,代码行数:15,代码来源:ViewImageActivity.java

示例6: trackAnalytics

import com.google.analytics.tracking.android.Tracker; //导入方法依赖的package包/类
private void trackAnalytics() {
    EasyTracker.getInstance().setContext(this);
    Tracker tracker = EasyTracker.getInstance().getTracker();

    if (mPhotoUser != null) {
        tracker.set("&uid", mPhotoUser.id.toString());
    } else {
        tracker.set("&uid", null);
    }

    if (mTheme != null) {
        tracker.trackView("theme/" + mTheme.id.toString());
    }
}
 
开发者ID:vicfryzel,项目名称:gplus-photohunt-client-android,代码行数:15,代码来源:ThemeViewActivity.java


注:本文中的com.google.analytics.tracking.android.Tracker.set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。