[英]Screen sending is not working with GoogleAnalytics iOS SDK 3.11
I am trying to send a screen to Google Analytics using its SDK (3.11) on iOS, but nothing is happening on the GA console, even after 24h. 我正在尝试使用iOS上的SDK(3.11)将屏幕发送到Google Analytics(分析),但是即使在24小时之后,GA控制台也没有任何反应。
I doubled checked the identifier which look like this UA-xxxxxxx-x. 我仔细检查了看起来像此UA-xxxxxxx-x的标识符。
Here is the code I use to setup the SDK : 这是我用来设置SDK的代码:
in my AppDelegate 在我的AppDelegate中
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [GAI sharedInstance].optOut = YES; [GAI sharedInstance].dispatchInterval = 1; [GAI sharedInstance].trackUncaughtExceptions = YES; [[[GAI sharedInstance] logger] setLogLevel:kGAILogLevelVerbose]; [[GAI sharedInstance] trackerWithTrackingId: self.config.googleAnalyticsTrackingId]; return YES; }
in my ViewController, which inherits from GAITrackedViewController 在我的ViewController中,该继承自GAITrackedViewController
- (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.screenName = @"MyControllerScreen"; }
Any idea ? 任何想法 ?
You have opted out of analytics data tracking.. 您已选择退出分析数据跟踪。
[GAI sharedInstance].optOut = YES;
Comment for optOut
property clearly states.. optOut
属性的注释明确指出。
When this is true, no tracking information will be gathered;
如果是这样,则不会收集任何跟踪信息。 tracking calls will effectively become no-ops.
跟踪呼叫将有效地变为无人操作。
So either set it to false optOut = NO
, or just comment out that line and try again. 因此,要么将其设置为false
optOut = NO
,要么仅注释掉该行,然后重试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.