Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kotlin Multiplatform ViewController.swift
import UIKit
import common
class ViewController: UIViewController {
let anatlyicsManager = IosAnalyticsManager()
override func viewDidLoad() {
super.viewDidLoad()
// Report page is viewed
anatlyicsManager.report(event: ViewEvent.init(pageName: "Main Page"))
}
@IBAction func redButtonClicked(_ sender: Any) {
anatlyicsManager.report(event: ButtonClickEvent.init(buttonName: "Red"))
}
@IBAction func greenButtonClicked(_ sender: Any) {
anatlyicsManager.report(event: ButtonClickEvent.init(buttonName: "Green"))
}
@IBAction func blueButtonClicked(_ sender: Any) {
anatlyicsManager.report(event: ButtonClickEvent.init(buttonName: "Blue"))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.