在Cocos2d上设置Google Analytics

时间:2014-02-28 16:53:25

标签: ios cocos2d-iphone google-analytics

我正在尝试设置谷歌分析,但我正在使用cocos 2d。

谷歌上的步骤说:

You would update this header to:

#import "GAITrackedViewController.h"

@interface HomeViewController : GAITrackedViewController

但是我怎么能看到我的标题是:

@interface GameMain : CCLayer <GKAchievementViewControllerDelegate, GKLeaderboardViewControllerDelegate, SKProductsRequestDelegate,SKPaymentTransactionObserver, MBProgressHUDDelegate >

然后它也说:

You must also provide the view name to be used in your Google Analytics reports. A good place to put this is the view controller's initializer method, if you have one, or the viewDidAppear: method:

- (void)viewDidAppear:(BOOL)animated {
  [super viewDidAppear:animated];
  self.screenName = @"About Screen";
}

如果有人知道解决方案,请告诉我。

由于

0 个答案:

没有答案