IDGraph iOS Tracking Code
於 2024年10月22日 (二) 07:26 由 CharlesWang(留言 | 貢獻) 所做的修訂
在AppDelegate的didFinishLaunchingWithOptions function中,帶入Service id初始化TAMIdGraphManager即可完成追蹤碼的建置。
其中Service id就是TAMedia提供給您的服務id。
請參考以下範例
Swift
在AppDelegate.swift內實作
import UIKit
import TAMIdGraph
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
TAMIdGraphManager.initTAMIdGraphManager(withServiceId:"Your Service Id")
return true
}
}
完成以上步驟即完成追蹤碼的設置