gpt4 book ai didi

iphone - 谷歌分析不工作 iOS

转载 作者:行者123 更新时间:2023-11-28 20:14:26 25 4
gpt4 key购买 nike

我已经实现了 3 个步骤。

第 1 步:我已下载谷歌分析库文件并将此文件添加到项目中,

  • GAI.h
  • GAITrackedViewController.h
  • GAITracker.h
  • GAITransaction.h
  • GAITransactionItem.h

  • libGoogleAnalytics.a

  • 核心数据框架
  • 系统配置.framework

第 2 步:didFinishLaunchingWithOptions 中添加此代码

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

[UIApplication sharedApplication].statusBarHidden = NO;

[GAI sharedInstance].trackUncaughtExceptions = YES;
[GAI sharedInstance].dispatchInterval = 2;
[GAI sharedInstance].debug=YES;
[[GAI sharedInstance] trackerWithTrackingId:@"UA-XXXX-1"];

return YES;
}

第 3 步:在我的 HomeScreen View 中,启动图像后加载我写这个,我已将此 header 更新为:

#import "GAITrackedViewController.h"

@interface BTSHomeViewController : GAITrackedViewController

并且在 BTSHomeViewController.m

- (void)viewDidLoad
{ ...
self.trackedViewName = @"Home";
}

注意:我写了self.trackedViewName = @"Home"; 只在第一页不在所有页面都需要写在所有页面中吗?

LOG 也显示此警告:

ld: warning: directory not found for option '-L/Users/Supriya/Desktop/BTS with Analytics/BTS 2.1/BTS/BTS/GoogleAnalytics/Library'
ld: warning: directory not found for option '-F/Users/Supriya/Desktop/BTS with Analytics/BTS 2.1/BTS/../../Documents'
ld: warning: directory not found for option '-F/Users/Supriya/Desktop/BTS with Analytics/BTS 2.1/BTS/../../../Documents'

当我在设备中运行我的代码时写完这个之后,谷歌分析没有显示任何活跃用户。

这是我项目中框架文件夹的快照,我是不是忘记添加任何库了?

:请帮忙,这是什么错误?

提前致谢。

最佳答案

  1. 只是为了确认一下,但是您已经为移动应用程序使用了跟踪 ID,对吧?为网络应用程序创建的跟踪 ID 在移动应用程序中使用时不会为您提供任何信息。

  2. 一旦在 App Delegate 中完成了初始设置,就可以像这样轻松地完成跟踪 - [[[GAI sharedInstance] defaultTracker] trackView:@"Screen name"];

关于iphone - 谷歌分析不工作 iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18593820/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com