google adwords conversion tracking with swift

我是研究僧i 提交于 2019-12-04 03:23:52

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.

Just add the pod to your podfile:

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):

// Google Conversion Tracking
ACTAutomatedUsageTracker.enableAutomatedUsageReportingWithConversionID("0123456789")
ACTConversionReporter.reportWithConversionID("0123456789", label: "XXXXXX", value: "0.00", isRepeatable: false)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!