|
@@ -177,16 +177,22 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
|
guard let type = KMPageEditType(rawValue: index) else {
|
|
|
if (index == KMPageEditType.insert_files) {
|
|
|
self.insertFileAction()
|
|
|
+ self.trackEvent(type: .insert, index: index)
|
|
|
} else if (index == KMPageEditType.insert_blank_page) {
|
|
|
self.insertBlankPageAction()
|
|
|
+ self.trackEvent(type: .insert, index: index)
|
|
|
} else if (index == KMPageEditType.insert_custom_page) {
|
|
|
self.item_insertCustomPage(sender: nil)
|
|
|
+ self.trackEvent(type: .insert, index: index)
|
|
|
} else if (index == KMPageEditType.insert_fromImage) {
|
|
|
self.item_insertFromImage(sender: nil)
|
|
|
+ self.trackEvent(type: .insert, index: index)
|
|
|
} else if (index == KMPageEditType.insert_fromClipboard) {
|
|
|
self.item_insertFromClipboard(sender: nil)
|
|
|
+ self.trackEvent(type: .insert, index: index)
|
|
|
} else if (index == KMPageEditType.insert_fromScanner) {
|
|
|
self.item_insertFromScanner(sender: nil)
|
|
|
+ self.trackEvent(type: .insert, index: index)
|
|
|
} else if (index == KMPageEditType.extract_selected_pages) {
|
|
|
self.extractSelectPageItemAction()
|
|
|
} else if (index == KMPageEditType.split_selected_pages) {
|
|
@@ -1812,11 +1818,33 @@ extension KMPDFEditViewController {
|
|
|
// MARK: - Analytics (埋点)
|
|
|
|
|
|
extension KMPDFEditViewController {
|
|
|
- func trackEvent(type: KMPageEditType) -> Void {
|
|
|
+ func trackEvent(type: KMPageEditType, index: Int = 0) -> Void {
|
|
|
if (type == .insert) {
|
|
|
- KMAnalytics.trackEvent(eventName: "Btn_SubTbr_Insert", parameters: [
|
|
|
- KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.subTbr_PageEdit,
|
|
|
- KMAnalytics.Parameter.labelKey : KMAnalytics.Label.subTbr_Btn], platform: .AppCenter, appTarget: .all)
|
|
|
+ if index == 0 {
|
|
|
+ KMAnalytics.trackEvent(eventName: "Btn_SubTbr_Insert", parameters: [
|
|
|
+ KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.subTbr_PageEdit,
|
|
|
+ KMAnalytics.Parameter.labelKey : KMAnalytics.Label.subTbr_Btn], platform: .AppCenter, appTarget: .all)
|
|
|
+ } else if index == KMPageEditType.insert_blank_page || index == KMPageEditType.insert_custom_page {
|
|
|
+ KMAnalytics.trackEvent(eventName: "Btn_SubTbr_PageEdit_InsertBlankPage", parameters: [
|
|
|
+ KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.subTbr_PageEdit,
|
|
|
+ KMAnalytics.Parameter.labelKey : KMAnalytics.Label.subTbr_Btn], platform: .AppCenter, appTarget: .all)
|
|
|
+ } else if index == KMPageEditType.insert_files {
|
|
|
+ KMAnalytics.trackEvent(eventName: "Btn_SubTbr_PageEdit_InsertPDF", parameters: [
|
|
|
+ KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.subTbr_PageEdit,
|
|
|
+ KMAnalytics.Parameter.labelKey : KMAnalytics.Label.subTbr_Btn], platform: .AppCenter, appTarget: .all)
|
|
|
+ } else if index == KMPageEditType.insert_fromImage {
|
|
|
+ KMAnalytics.trackEvent(eventName: "Btn_SubTbr_PageEdit_InsertImage", parameters: [
|
|
|
+ KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.subTbr_PageEdit,
|
|
|
+ KMAnalytics.Parameter.labelKey : KMAnalytics.Label.subTbr_Btn], platform: .AppCenter, appTarget: .all)
|
|
|
+ } else if index == KMPageEditType.insert_fromClipboard {
|
|
|
+ KMAnalytics.trackEvent(eventName: "Btn_SubTbr_PageEdit_InsertClipboard", parameters: [
|
|
|
+ KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.subTbr_PageEdit,
|
|
|
+ KMAnalytics.Parameter.labelKey : KMAnalytics.Label.subTbr_Btn], platform: .AppCenter, appTarget: .all)
|
|
|
+ } else if index == KMPageEditType.insert_fromScanner {
|
|
|
+ KMAnalytics.trackEvent(eventName: "Btn_SubTbr_PageEdit_InsertScanner", parameters: [
|
|
|
+ KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.subTbr_PageEdit,
|
|
|
+ KMAnalytics.Parameter.labelKey : KMAnalytics.Label.subTbr_Btn], platform: .AppCenter, appTarget: .all)
|
|
|
+ }
|
|
|
} else if (type == .extract) {
|
|
|
KMAnalytics.trackEvent(eventName: "Btn_SubTbr_Extract", parameters: [
|
|
|
KMAnalytics.Parameter.categoryKey : KMAnalytics.Category.subTbr_PageEdit,
|