Skip to content

Commit

Permalink
[Feat] Runnect#230 - GA 버튼 추적 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
thingineeer committed Dec 29, 2023
1 parent 681c3f7 commit dc54f0c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
12 changes: 0 additions & 12 deletions Runnect-iOS/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,4 @@ post_install do |installer|
end
end


post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
end
end

end
2 changes: 1 addition & 1 deletion Runnect-iOS/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,6 @@ SPEC CHECKSUMS:
SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25
Then: 844265ae87834bbe1147d91d5d41a404da2ec27d

PODFILE CHECKSUM: db3805234cfa742a710f669ccf32e9c5999acd12
PODFILE CHECKSUM: 74de7f641476f143613e7b2bfe2c3275248503e4

COCOAPODS: 1.14.3
5 changes: 5 additions & 0 deletions Runnect-iOS/Runnect-iOS/Global/Manager/GAManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@ final class GAManager {

enum EventType {
case screen(screenName: String)
case button(buttonName: String)

var eventName: String {
switch self {
case .screen:
return "screen"
case .button:
return "button"
}
}

var parameters: [String: Any]? {
switch self {
case .screen(let screenName):
["screen": screenName]
case .button(let buttonName):
["button": buttonName]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ final class CourseDetailVC: UIViewController {
setLayout()
setAddTarget()
setRefreshControl()
analyze()
self.hideTabBar(wantsToHide: true)
}

Expand Down Expand Up @@ -662,3 +663,9 @@ extension CourseDetailVC {
}
}
}

extension CourseDetailVC {
private func analyze() {
GAManager.shared.logEvent(eventType: .screen(screenName: "코스 상세 페이지"))
}
}

0 comments on commit dc54f0c

Please sign in to comment.