[英]How to send advertiserId to Segment-Analytics if iAD is deprecated
I'm trying to integrate Facebook App Events through Segments. 我正在尝试通过细分整合Facebook应用事件。
From Segment Integration Docs : 来自细分受众群集成文档 :
You will have to be sure that the IDFA is working within your app, which involves adding the iAD framework . 您必须确保IDFA在您的应用程序内正常工作,这涉及添加iAD framework 。
Once you have added this, you will start to see the context.device.advertiserId populate and the context.device.adTrackingEnabled flag set to true. 添加后,您将开始看到context.device.advertiserId填充,并且context.device.adTrackingEnabled标志设置为true。
But, iAD was deprecated ! 但是, iAD已弃用 !
From Apple documentation: 从Apple文档中:
iAd Framework iAd框架
On your next regular app update or submission, you should remove the deprecated iAd framework and connection. 在下一次常规应用更新或提交时,您应该删除不推荐使用的iAd框架和连接。
When I open the debugger in Segment, the values are not there: 当我在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 . 提交到AppStore时,我会将IDFA标记为“细分需求” 。 So I can imagine that somehow it's connected. 所以我可以想象它以某种方式连接在一起。
Someone knows how to send advertiserId and adTrackingEnabled = true to Segment? 有人知道如何将AdvertiserId和adTrackingEnabled = true发送给Segment吗?
I solved the problem with this two lines of code: 我用这两行代码解决了这个问题:
import AdSupport
ASIdentifierManager.sharedManager().advertisingTrackingEnabled
Only using this two lines, Segment-Analytics is able to send the data to their server. 仅使用这两行,Segment-Analytics就能将数据发送到其服务器。
"device": {
"adTrackingEnabled": true,
"advertisingId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"manufacturer": "Apple",
"model": "x86_64",
"type": "ios"
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.