我们在 iOS 应用程序中设置了 Google Analytics,该应用程序发送供应商标识符以区分报告中的用户。这是我们所做的:
在 Google Analytics 中,我们设置了一个自定义维度,如下所示:
名称:用户标识符
范围:用户
主动:真实
在应用程序中,我们在 AppDelegate 中添加以下内容:
[tracker set:[GAIFields customDimensionForIndex:1] value:uuidString]; // uuidString is the device identifier
在日志记录窗口中我可以看到cd1
是正确的值,但我们的自定义报告没有显示自定义维度的数据。
我们正在使用 Google Analytics 3.02。
有谁知道我们哪里出了问题吗?
您要发送跟踪器吗?
这是一个来自iOS SDK 的自定义维度和指标 https://developers.google.com/analytics/devguides/collection/ios/v3/customdimsmets#set-send
// May return nil if a tracker has not yet been initialized with a property ID.
id tracker = [[GAI sharedInstance] defaultTracker];
// Set the custom dimension value on the tracker using its index.
[tracker set:[GAIFields customDimensionForIndex:1]
value:@"Premium user"]
[tracker set:kGAIScreenName
value:@"Home screen"];
// Send the custom dimension value with a screen view.
// Note that the value only needs to be sent once, so it is set on the Map,
// not the tracker.
[tracker send:[[[GAIDictionaryBuilder createAppView] set:@"premium"
forKey:[GAIFields customDimensionForIndex:1]] build]];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)