【发布时间】:2020-09-25 09:44:00
【问题描述】:
确认类名正确
import Foundation
import GoogleTagManager
import Branch
@objc(CustomEventTagFunction)
final class CustomEventTagFunction : NSObject, TAGCustomFunction {
@objc func execute(withParameters parameters: [AnyHashable : Any]!) -> NSObject! {
print("it works")
return nil
}
}
查看事件是否记录在输出中:
2020-09-25 17:40:31.908572+0800 test-wryg[63300:473903] GoogleTagManager info: Processing logged event: gtm_test with parameters: {
"_sc" = DemoViewController;
"_si" = 8977004208359017134;
name = jeff;
}
但是“它有效”不是从自定义打印出来的,我应该检查什么吗?
谢谢
【问题讨论】:
-
第二天回来,它就可以工作了。 ; D
标签: ios swift google-tag-manager