當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。