【问题标题】:How to send advertiserId to Segment-Analytics if iAD is deprecated如果 iAD 已弃用,如何将广告客户 ID 发送到 Segment-Analytics
【发布时间】:2017-03-11 05:04:33
【问题描述】:

我正在尝试通过细分集成 Facebook 应用事件。

来自Segment Integration Docs

您必须确保 IDFA 在您的应用中运行,这涉及添加 iAD 框架

添加后,您将开始看到 context.device.advertiserId 填充并且 context.device.adTrackingEnabled 标志设置为 true。

但是,iAD was deprecated!

来自 Apple 文档:

iAd 框架
在您下次定期更新或提交应用时,您应该删除已弃用的 iAd 框架和连接。

当我在 Segment 中打开调试器时,值不存在:

"context": {
    "device": {
      "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
      "manufacturer": "Apple",
      "model": "x86_64",
      "type": "ios"
    },
}

When submitting to the AppStore, I'm flagging YES to IDFA as a Segment requirement。所以我可以想象它以某种方式连接。

有人知道如何将 advertiserIdadTrackingEnabled = true 发送到 Segment?

【问题讨论】:

    标签: ios facebook idfa facebook-analytics segment-analytics


    【解决方案1】:

    我用这两行代码解决了问题:

    import AdSupport
    
    ASIdentifierManager.sharedManager().advertisingTrackingEnabled
    

    只有使用这两行,Segment-Analytics 才能将数据发送到他们的服务器。

    "device": {
      "adTrackingEnabled": true,
      "advertisingId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
      "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
      "manufacturer": "Apple",
      "model": "x86_64",
      "type": "ios"
    },
    

    【讨论】:

      猜你喜欢
      • 2016-01-05
      • 2017-03-13
      • 2022-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-25
      相关资源
      最近更新 更多