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"
我正在尝试让谷歌adwords在我跟踪的一个swift项目上运行,这个项目我跟踪了https://developers.google.com/app-conversion-tracking/ios/,但是没有结果。一直说没有这样的模块"ACTReporter"
Does anyone have any info?
有人知道吗?
1 个解决方案
#1
14
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.
这在Swift中可以使用通常的桥接头例程。您可以手动将SDK添加到项目中,或者使用GoogleConversionTracking pod。
Just add the pod to your podfile:
把pod添加到你的播客中:
pod 'GoogleConversionTracking'
and then add the following to your bridging header:
然后在桥接标头中添加以下内容:
#import <GoogleConversionTracking/ACTReporter.h>
And finally, in your AppDelegate.swift file (with the correct ID and label):
最后,在AppDelegate中。swift文件(ID和标签正确):
// Google Conversion Tracking
ACTAutomatedUsageTracker.enableAutomatedUsageReportingWithConversionID("0123456789")
ACTConversionReporter.reportWithConversionID("0123456789", label: "XXXXXX", value: "0.00", isRepeatable: false)
#1
14
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.
这在Swift中可以使用通常的桥接头例程。您可以手动将SDK添加到项目中,或者使用GoogleConversionTracking pod。
Just add the pod to your podfile:
把pod添加到你的播客中:
pod 'GoogleConversionTracking'
and then add the following to your bridging header:
然后在桥接标头中添加以下内容:
#import <GoogleConversionTracking/ACTReporter.h>
And finally, in your AppDelegate.swift file (with the correct ID and label):
最后,在AppDelegate中。swift文件(ID和标签正确):
// Google Conversion Tracking
ACTAutomatedUsageTracker.enableAutomatedUsageReportingWithConversionID("0123456789")
ACTConversionReporter.reportWithConversionID("0123456789", label: "XXXXXX", value: "0.00", isRepeatable: false)