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


TypeScript ionic-native.GoogleAnalytics类代码示例

本文整理汇总了TypeScript中ionic-native.GoogleAnalytics的典型用法代码示例。如果您正苦于以下问题:TypeScript GoogleAnalytics类的具体用法?TypeScript GoogleAnalytics怎么用?TypeScript GoogleAnalytics使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: catch

        this.platform.ready().then(() => {
            try {
                 GoogleAnalytics.debugMode();
             GoogleAnalytics.startTrackerWithId('UA-70035565-4');

             GoogleAnalytics.enableUncaughtExceptionReporting(true)
                 .then((_success) => {
                     console.log(_success);
                 }).catch((_error) => {
                     console.log(_error);
                 });

            } catch (error) {
                 console.log(error);
            }
            });
开发者ID:offlineprogrammer,项目名称:kidsTokens,代码行数:16,代码来源:googleAnalyticsService.ts

示例2: catch

		this.platform.ready().then(() => {
			try {
				GoogleAnalytics.startTrackerWithId('UA-64143538-11');
			} catch (error) {
				console.error('GoogleAnalytics: ' + error);
			}
			NativeAudio.preloadSimple('touch', 'assets/audio/touch.mp3')
			.then(() => this.isInit = true);
		});
开发者ID:xuender,项目名称:family,代码行数:9,代码来源:back-service.ts

示例3: trackView

 trackView(view) {
   if (window['cordova']) {
     this.initID();
     GoogleAnalytics.trackView(view);
   } else {
     /* tslint:disable */
     console.log("Analytics Track: " + view);
     /* tslint:enable */
   }
 }
开发者ID:LegendZhu,项目名称:growth,代码行数:10,代码来源:analytics.services.ts

示例4: trackEvent

 trackEvent(category, action) {
   if (window['cordova']) {
     this.initID();
     GoogleAnalytics.trackEvent(category, action);
   } else {
     /* tslint:disable */
     console.log("Analytics Event: " + category + " Action: " + action);
     /* tslint:enable */
   }
 }
开发者ID:LegendZhu,项目名称:growth,代码行数:10,代码来源:analytics.services.ts

示例5:

    this.platform.ready().then(() => {
      this.isWindows = this.platform.is('windows');
      if(this.platform.is('cordova')) {
        this.isAuthenticated = this.auth.isAuthenticated();
        // Google Analytics and user settings no applicable on Windows Phone
        if(!this.isWindows) {
          GoogleAnalytics.trackView('Home Page');

          if(this.user.social.facebook && this.user.social.facebook.uid) {
            this.currUser = {
              id: this.user.social.facebook.uid,
              name: this.user.social.facebook.data.full_name,
              photo: this.user.social.facebook.data.profile_picture
            };
          }
        }
      }
    });
开发者ID:jbw91,项目名称:scripture-golf,代码行数:18,代码来源:home.ts

示例6: trackView

 /**
  * Track a screen
  *
  * @param {string}  title        - Screen title
  * @param {string}  campaignUrl  - (Optional) Campaign url for measuring referrals
  * 
  * @static
  * @returns {Promise<void>}
  */
 public static trackView(title: string, campaignUrl?: string): Promise<void> {
     return GoogleAnalytics.trackView(title, campaignUrl)
         .then(console.log, console.error);
 }
开发者ID:RioBus,项目名称:ionic,代码行数:13,代码来源:analytics.ts

示例7: if

 .then(() => { if (DEBUG_MODE) GoogleAnalytics.debugMode(); }, console.error);
开发者ID:RioBus,项目名称:ionic,代码行数:1,代码来源:analytics.ts

示例8:

 .then(() => GoogleAnalytics.enableUncaughtExceptionReporting(true), console.error)
开发者ID:RioBus,项目名称:ionic,代码行数:1,代码来源:analytics.ts

示例9: configure

 /**
  * Configures Analytics driver
  * 
  * @static
  * @returns {Promise<void>}
  */
 public static configure(): Promise<void> {
     return GoogleAnalytics.startTrackerWithId(ANALYTICS_UA)
         .then(() => GoogleAnalytics.enableUncaughtExceptionReporting(true), console.error)
         .then(() => { if (DEBUG_MODE) GoogleAnalytics.debugMode(); }, console.error);
 }
开发者ID:RioBus,项目名称:ionic,代码行数:11,代码来源:analytics.ts

示例10:

 this.platform.ready().then(() => {
   GoogleAnalytics.trackView("Help Page");
 });
开发者ID:Mardox,项目名称:TApp,代码行数:3,代码来源:help.ts


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