Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created August 30, 2018 20:53
Show Gist options
  • Save adrianhall/7c71884b5ec67bebb68ce423d5c43197 to your computer and use it in GitHub Desktop.
Save adrianhall/7c71884b5ec67bebb68ce423d5c43197 to your computer and use it in GitHub Desktop.
class MasterViewController: UITableViewController {
var analyticsService: AnalyticsService? = nil
override func viewDidLoad() {
super.viewDidLOad()
analyticsService = (UIApplication.shared.delegate as! AppDelegate).analyticsService
// Rest of initialization here
// Record the view load
analyticsService?.recordEvent("ViewLoad", parameters: ["id":"Master"], metrics: nil)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment