我们正在尝试通过 Google 跟踪代码管理器使用 AdWords 转化跟踪,但无法将跟踪状态更改为“已验证”。可能事件没有正确触发..
有人能用吗?
这是我们的流程:
- 制作 AdWords 广告系列。
- 创建 iOS conversion tag in tag manager .
- 集成跟踪代码管理器。
这是集成代码:
// used for the container preview
NSURL *launchURL = launchOptions[UIApplicationLaunchOptionsURLKey];
[TAGManager.instance previewWithUrl:launchURL];
#if DEBUG
[[TAGManager instance].logger setLogLevel:kTAGLoggerLogLevelVerbose];
#endif
// https://developers.google.com/tag-manager/ios/v3/
[TAGContainerOpener openContainerWithId:@"GTM-TAAAAG"
tagManager:[TAGManager instance]
openType:kTAGOpenTypePreferNonDefault
timeout:nil
notifier:self];
#pragma mark - TAGContainerOpenerNotifier
- (void)containerAvailable:(TAGContainer *)container
{
TAGDataLayer *dataLayer = [TAGManager instance].dataLayer;
[dataLayer pushValue:@"appLaunch" forKey:@"event"];
}
其他信息:
最佳答案
该死的谷歌...
该SDK是由其他开发者实现的,所以我删除并重新下载。下载 SDK 后,我像任何开发人员一样使用它附带的 RTFM,发现了这个:
In order to ensure that the libAdIdAccess.a code doesn't get dead-stripped from your executable during linking, you'll need to either add the -all_load or -ObjC flag to the "Other Linker Flags", or, for finer-grained control, add the -force_load flag (followed by a full pathname to libAdIdAccess.a).
我的意思是..来吧。不能有一个有用的错误消息指出我错过了这个吗?由于流氓库,我们无法在应用程序中使用 -ObjC
,因此它导致 GTM 无法工作,而使用 -force_load
就成功了。
现在,我看到了以下日志,这是我以前没有看到的:
GoogleTagManager verbose: Successfully sent hit: http://www.googleadservices.com/pagead/conversion/...
现在,我是一只快乐的 Pandas 。
关于ios - 使用标签管理器进行 AdWords 转化跟踪,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23731500/