Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions LearnGit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
6B3F5C422B2E9F54000CF0CB /* LearnGitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B3F5C412B2E9F54000CF0CB /* LearnGitTests.swift */; };
6B3F5C4C2B2E9F54000CF0CB /* LearnGitUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B3F5C4B2B2E9F54000CF0CB /* LearnGitUITests.swift */; };
6B3F5C4E2B2E9F54000CF0CB /* LearnGitUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B3F5C4D2B2E9F54000CF0CB /* LearnGitUITestsLaunchTests.swift */; };
6B6B1D232C02BC5F004BB50A /* StantonAnalyticsClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B6B1D222C02BC5F004BB50A /* StantonAnalyticsClient.swift */; };
6BE191AA2BFED1C7000283DC /* SomeOtherAnalyticsClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BE191A92BFED1C7000283DC /* SomeOtherAnalyticsClient.swift */; };
6BF5D9F12C01D48F00D554C8 /* PermutiveAnalyticsClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BF5D9F02C01D48F00D554C8 /* PermutiveAnalyticsClient.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -65,6 +66,7 @@
6B3F5C472B2E9F54000CF0CB /* LearnGitUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LearnGitUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6B3F5C4B2B2E9F54000CF0CB /* LearnGitUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LearnGitUITests.swift; sourceTree = "<group>"; };
6B3F5C4D2B2E9F54000CF0CB /* LearnGitUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LearnGitUITestsLaunchTests.swift; sourceTree = "<group>"; };
6B6B1D222C02BC5F004BB50A /* StantonAnalyticsClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StantonAnalyticsClient.swift; sourceTree = "<group>"; };
6BE191A92BFED1C7000283DC /* SomeOtherAnalyticsClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SomeOtherAnalyticsClient.swift; sourceTree = "<group>"; };
6BF5D9F02C01D48F00D554C8 /* PermutiveAnalyticsClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermutiveAnalyticsClient.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -103,6 +105,7 @@
6BE191A92BFED1C7000283DC /* SomeOtherAnalyticsClient.swift */,
6BF5D9F02C01D48F00D554C8 /* PermutiveAnalyticsClient.swift */,
6B2226B62C0210F600205127 /* ComsocreAnalyticsClient.swift */,
6B6B1D222C02BC5F004BB50A /* StantonAnalyticsClient.swift */,
);
path = Analytics;
sourceTree = "<group>";
Expand Down Expand Up @@ -297,6 +300,7 @@
6B2511892BFDF1CC00EB7861 /* AnalyticsManager.swift in Sources */,
6B2511822BFDC48F00EB7861 /* BookmarkingViewController.swift in Sources */,
6B2511842BFDED1C00EB7861 /* AnalyticsProtocol.swift in Sources */,
6B6B1D232C02BC5F004BB50A /* StantonAnalyticsClient.swift in Sources */,
6B3F5C2F2B2E9F54000CF0CB /* ViewController.swift in Sources */,
6BE191AA2BFED1C7000283DC /* SomeOtherAnalyticsClient.swift in Sources */,
6B3F5C2B2B2E9F54000CF0CB /* AppDelegate.swift in Sources */,
Expand Down
23 changes: 23 additions & 0 deletions LearnGit/Analytics/StantonAnalyticsClient.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// StantonAnalytics.swift
// LearnGit
//
// Created by Eric Ho on 5/26/24.
//

import Foundation

class StantonAnalyticsClient: AnalyticsProtocol {

init() {
config()
}

func config() {
print("\(type(of: self)): \(#function)")
}

func sendEvent(name: String, parameters: [String : String]) {
print("\(type(of: self)): \(#function): \(name) : \(parameters)")
}
}
2 changes: 1 addition & 1 deletion LearnGit/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ViewController: UIViewController {

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
let analyticsManager = AnalyticsManager(clients: [GA4Client(),SomeOtherAnalyticsClient(), PermutiveAnalysis(accountId: "123456789"), ComsocreAnalyticsClient()])
let analyticsManager = AnalyticsManager(clients: [GA4Client(),SomeOtherAnalyticsClient(), PermutiveAnalysis(accountId: "123456789"), ComsocreAnalyticsClient(), StantonAnalyticsClient()])

//view_article event
//send event
Expand Down