ios - 使用标签管理器进行 AdWords 转化跟踪

标签 ios google-ads-api google-tag-manager

我们正在尝试通过 Google 跟踪代码管理器使用 AdWords 转化跟踪,但无法将跟踪状态更改为“已验证”。可能事件没有正确触发..

有人能用吗?

这是我们的流程:

  1. 制作 AdWords 广告系列。
  2. 创建 iOS conversion tag in tag manager .
  3. 集成跟踪代码管理器。

这是集成代码:

// 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"];
}

其他信息:

enter image description here

最佳答案

该死的谷歌...

该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/

相关文章:

ios - 计时器显示/隐藏 subview

google-apps-script - 在 Google Apps 脚本中使用 Adwords API (MccApp)

python - 为什么当我尝试打开 Google AdWords 时,Python 中的 Machenize 包会打开支持页面?

google-analytics - 如何在新版本的 GTM 中跟踪虚拟综合浏览量?

ios - 如何在运行时找到 CIFILter 类别?

iphone - 编辑时隐藏一些 UITableViewCells?

ios - iOS 中的架构问题

ios - 使用 swift 进行谷歌 adwords 转化跟踪

google-tag-manager - Google Tag Manager 错误 : Uncaught TypeError: w[l]. 推送不是功能

javascript - Google 跟踪代码管理器自定义 JavaScript 错误