使用swift进行google adwords转换跟踪 [英] google adwords conversion tracking with swift
问题描述
我正在尝试使用google adwords处理我遵循的快速项目 https://developers.google .com / app-conversion-tracking / ios / 并没有结果。继续说没有这样的模块ACTReporter
I am trying to get google adwords working on a swift project I have followed https://developers.google.com/app-conversion-tracking/ios/ and have had no results. Keeps saying no such module "ACTReporter"
有没有人有任何信息?
Does anyone have any info?
推荐答案
这可以在Swift中使用通常的桥接头例程。您可以手动将SDK添加到项目中或使用GoogleConversionTracking pod。
This is possible in Swift using the usual bridging header routine. You can add the SDK to your project manually or use the GoogleConversionTracking pod.
只需将pod添加到您的podfile:
Just add the pod to your podfile:
pod 'GoogleConversionTracking'
然后添加关注桥接标题:
#import <GoogleConversionTracking/ACTReporter.h>
最后,在你的AppDelegate.swift文件中(使用正确的ID和标签):
And finally, in your AppDelegate.swift file (with the correct ID and label):
// Google Conversion Tracking
ACTAutomatedUsageTracker.enableAutomatedUsageReportingWithConversionID("0123456789")
ACTConversionReporter.reportWithConversionID("0123456789", label: "XXXXXX", value: "0.00", isRepeatable: false)
这篇关于使用swift进行google adwords转换跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!