|
@@ -9,7 +9,7 @@ import BFCommonKit
|
|
import BFNetRequestKit
|
|
import BFNetRequestKit
|
|
import UIKit
|
|
import UIKit
|
|
|
|
|
|
-class BFEventTrackAdaptor: NSObject {
|
|
+public class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -20,7 +20,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func baseReportUpload(logType: statisticsLogType = .st_log_type_simpleevent, businessType: businessType?, objectType: objectType?, pageSource: PAGESOURCE?, params: [String: Any]? = nil, eventData: [String: Any]? = nil, extParams: [String: Any]? = nil, commonParams: [String: Any]? = nil) {
|
|
+ public class func baseReportUpload(logType: statisticsLogType = .st_log_type_simpleevent, businessType: businessType?, objectType: objectType?, pageSource: PAGESOURCE?, params: [String: Any]? = nil, eventData: [String: Any]? = nil, extParams: [String: Any]? = nil, commonParams: [String: Any]?) {
|
|
BFBaseEventTrack.bf_frontendReportUpload(url: PQENVUtil.shared.commonapi + staticsFrontendReportUrl, logType: logType.rawValue, businessType: businessType?.rawValue, objectType: objectType?.rawValue, pageSource: pageSource?.rawValue, params: params, eventData: eventData, extParams: extParams, commonParams: commonParams)
|
|
BFBaseEventTrack.bf_frontendReportUpload(url: PQENVUtil.shared.commonapi + staticsFrontendReportUrl, logType: logType.rawValue, businessType: businessType?.rawValue, objectType: objectType?.rawValue, pageSource: pageSource?.rawValue, params: params, eventData: eventData, extParams: extParams, commonParams: commonParams)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -36,7 +36,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func videoRelationReportUpload(reportLogType: reportLogType, videoData: BFVideoItemProtocol?, pageSource: PAGESOURCE? = nil, businessType: businessType?, objectType: objectType? = nil, extParams: [String: Any]? = nil, shareId: String? = nil, videoIds: String? = nil, playId: String? = nil, headVideoId: String? = nil, projectId: String?, parentProjectId: String?, rootProjectId: String?, canProduce: String?, parentVideoId: String?, commonParams: [String: Any]? = nil) {
|
|
+ public class func videoRelationReportUpload(reportLogType: reportLogType, videoData: BFVideoItemProtocol?, pageSource: PAGESOURCE? = nil, businessType: businessType?, objectType: objectType? = nil, extParams: [String: Any]? = nil, shareId: String? = nil, videoIds: String? = nil, playId: String? = nil, headVideoId: String? = nil, projectId: String?, parentProjectId: String?, rootProjectId: String?, canProduce: String?, parentVideoId: String?, commonParams: [String: Any]?) {
|
|
DispatchQueue.global().async {
|
|
DispatchQueue.global().async {
|
|
var tempExtParams: [String: Any] = extParams ?? [:]
|
|
var tempExtParams: [String: Any] = extParams ?? [:]
|
|
if videoData?.topicData != nil {
|
|
if videoData?.topicData != nil {
|
|
@@ -65,7 +65,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
tempExtParams["videoId"] = "\(videoData?.id ?? 0)"
|
|
tempExtParams["videoId"] = "\(videoData?.id ?? 0)"
|
|
}
|
|
}
|
|
if objectType == .ot_reproduce_clickButton || objectType == .ot_reproduce_collectionBar || objectType == .ot_reproduce_collectionClicButton || objectType == .ot_reproduce_sameSourceButton {
|
|
if objectType == .ot_reproduce_clickButton || objectType == .ot_reproduce_collectionBar || objectType == .ot_reproduce_collectionClicButton || objectType == .ot_reproduce_sameSourceButton {
|
|
- baseReportUpload(businessType: businessType, objectType: objectType, pageSource: pageSource != nil ? pageSource! : (videoData?.pageSource ?? .sp_category), extParams: tempExtParams)
|
|
+ baseReportUpload(businessType: businessType, objectType: objectType, pageSource: pageSource != nil ? pageSource! : (videoData?.pageSource ?? .sp_category), extParams: tempExtParams, commonParams: commonParams)
|
|
} else {
|
|
} else {
|
|
var url: String = PQENVUtil.shared.longvideoapi
|
|
var url: String = PQENVUtil.shared.longvideoapi
|
|
var params: [String: Any] = [:]
|
|
var params: [String: Any] = [:]
|
|
@@ -121,7 +121,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func shareReportUpload(isShareVideo: Bool = true, screenType: Int = 1, videoId: String, pageSource: PAGESOURCE, recommendId: String?, recommendLogVO: String?, flowPool: String?, abInfoData: String?, measureType: Int?, measureId: Int?, businessType: businessType?, targetUid: Int?, shareId: String = "", playId: String?, wxOpenId: String?, extParams: [String: Any]? = nil, commonParams: [String: Any]? = nil) {
|
|
+ public class func shareReportUpload(isShareVideo: Bool = true, screenType: Int = 1, videoId: String, pageSource: PAGESOURCE, recommendId: String?, recommendLogVO: String?, flowPool: String?, abInfoData: String?, measureType: Int?, measureId: Int?, businessType: businessType?, targetUid: Int?, shareId: String = "", playId: String?, wxOpenId: String?, extParams: [String: Any]? = nil, commonParams: [String: Any]?) {
|
|
DispatchQueue.global().async {
|
|
DispatchQueue.global().async {
|
|
var url: String = PQENVUtil.shared.longvideoapi
|
|
var url: String = PQENVUtil.shared.longvideoapi
|
|
switch screenType {
|
|
switch screenType {
|
|
@@ -140,7 +140,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func dnsReportUpload(commonParams: [String: Any]? = nil) {
|
|
+ public class func dnsReportUpload(commonParams: [String: Any]?) {
|
|
DispatchQueue.global().async {
|
|
DispatchQueue.global().async {
|
|
let speedExtParams = bf_parseDNS(hostUrl: "speed.piaoquantv.com")
|
|
let speedExtParams = bf_parseDNS(hostUrl: "speed.piaoquantv.com")
|
|
let rescdnExtParams = bf_parseDNS(hostUrl: "rescdn.yishihui.com")
|
|
let rescdnExtParams = bf_parseDNS(hostUrl: "rescdn.yishihui.com")
|
|
@@ -233,7 +233,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func reportPushActionUpload(pushId: String, pushTargetType: Int, pushBrand: String, pushTargetId: String?, bizParam: [String: Any]? = nil, commonParams: [String: Any]? = nil) {
|
|
+ public class func reportPushActionUpload(pushId: String, pushTargetType: Int, pushBrand: String, pushTargetId: String?, bizParam: [String: Any]? = nil, commonParams: [String: Any]?) {
|
|
BFBaseEventTrack.bf_pushActionReportUpload(url: PQENVUtil.shared.longvideoapi + pushActionReportUrl, pushId: pushId, pushTargetType: pushTargetType, pushBrand: pushBrand, pushTargetId: pushTargetId, bizParam: bizParam, commonParams: commonParams)
|
|
BFBaseEventTrack.bf_pushActionReportUpload(url: PQENVUtil.shared.longvideoapi + pushActionReportUrl, pushId: pushId, pushTargetType: pushTargetType, pushBrand: pushBrand, pushTargetId: pushTargetId, bizParam: bizParam, commonParams: commonParams)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -241,7 +241,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func reportPushDeviceTokenUpload(registerId: String, deviceToken: String, brand: String, commonParams: [String: Any]? = nil, completeHander: @escaping (_ isSuccess: Bool) -> Void) {
|
|
+ public class func reportPushDeviceTokenUpload(registerId: String, deviceToken: String, brand: String, commonParams: [String: Any]?, completeHander: @escaping (_ isSuccess: Bool) -> Void) {
|
|
BFBaseEventTrack.bf_deviceTokenReportUpload(url: PQENVUtil.shared.longvideoapi + pushDeviceTokenReportUrl, registerId: registerId, deviceToken: deviceToken, brand: brand, commonParams: commonParams, completeHander: completeHander)
|
|
BFBaseEventTrack.bf_deviceTokenReportUpload(url: PQENVUtil.shared.longvideoapi + pushDeviceTokenReportUrl, registerId: registerId, deviceToken: deviceToken, brand: brand, commonParams: commonParams, completeHander: completeHander)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -252,7 +252,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func searchReportUpload(keyWord: String, searchType: Int, searchNumber: Int = 10, reportType: Int = 2, commonParams: [String: Any]? = nil) {
|
|
+ public class func searchReportUpload(keyWord: String, searchType: Int, searchNumber: Int = 10, reportType: Int = 2, commonParams: [String: Any]?) {
|
|
BFBaseEventTrack.bf_searchReportUpload(url: PQENVUtil.shared.longvideoapi + searchReportUrl, keyWord: keyWord, searchType: searchType, searchNumber: searchNumber, reportType: reportType, commonParams: commonParams)
|
|
BFBaseEventTrack.bf_searchReportUpload(url: PQENVUtil.shared.longvideoapi + searchReportUrl, keyWord: keyWord, searchType: searchType, searchNumber: searchNumber, reportType: reportType, commonParams: commonParams)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -263,7 +263,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func publishReportUpload(projectId: String?, businessType: businessType, ossInfo: [String: Any], params: [String: Any], commonParams: [String: Any]? = nil) {
|
|
+ public class func publishReportUpload(projectId: String?, businessType: businessType, ossInfo: [String: Any], params: [String: Any], commonParams: [String: Any]?) {
|
|
var extParams: [String: Any] = ["ossInfo": bf_dictionaryToJsonString(ossInfo) ?? "", "params": bf_dictionaryToJsonString(params) ?? ""]
|
|
var extParams: [String: Any] = ["ossInfo": bf_dictionaryToJsonString(ossInfo) ?? "", "params": bf_dictionaryToJsonString(params) ?? ""]
|
|
if projectId != nil {
|
|
if projectId != nil {
|
|
extParams["projectId"] = projectId
|
|
extParams["projectId"] = projectId
|
|
@@ -346,7 +346,7 @@ class BFEventTrackAdaptor: NSObject {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public class func messageReportUpload(messageIds: String?, clickId: String?, messageType: messageType?, messageSubType: messageSubType?, actionType: actionType?, objectType: objectType?, pageSource: PAGESOURCE?, readStatus: Int = 1, eventData: [String: Any]? = nil, extParams: [String: Any]? = nil, commonParams: [String: Any]? = nil) {
|
|
+ public class func messageReportUpload(messageIds: String?, clickId: String?, messageType: messageType?, messageSubType: messageSubType?, actionType: actionType?, objectType: objectType?, pageSource: PAGESOURCE?, readStatus: Int = 1, eventData: [String: Any]? = nil, extParams: [String: Any]? = nil, commonParams: [String: Any]?) {
|
|
BFBaseEventTrack.bf_messageReportUpload(url: PQENVUtil.shared.longvideoapi + messagePeportUrl, messageIds: messageIds, clickId: clickId, messageType: messageType?.rawValue, messageSubType: messageSubType?.rawValue, actionType: actionType?.rawValue, readStatus: readStatus, objectType: objectType?.rawValue, pageSource: pageSource?.rawValue, eventData: eventData, extParams: extParams, commonParams: commonParams)
|
|
BFBaseEventTrack.bf_messageReportUpload(url: PQENVUtil.shared.longvideoapi + messagePeportUrl, messageIds: messageIds, clickId: clickId, messageType: messageType?.rawValue, messageSubType: messageSubType?.rawValue, actionType: actionType?.rawValue, readStatus: readStatus, objectType: objectType?.rawValue, pageSource: pageSource?.rawValue, eventData: eventData, extParams: extParams, commonParams: commonParams)
|
|
}
|
|
}
|
|
}
|
|
}
|