Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 895 Bytes

File metadata and controls

44 lines (27 loc) · 895 Bytes

SimpleGoogleAnalytics

SimpleGoogleAnalytics is fairly simple way to use Google Analytics on OSX. We use it for the new version of Plug.

Thanks to Coppertio's AnalyticEverything for most of the system profiling code.

Usage

Setup

let tracker = SimpleGoogleAnalytics.Manager(trackingID: "UA-XXXXXXXX-X", appBundle: NSBundle.main, userID: nil)

Pageviews

tracker.trackPageview("Main Window")

Events

tracker.trackEvent(category: "Button", action: "Click", label: "Sign In", value: nil)

Exceptions

tracker.trackException(description: "Exception", fatal: true)

Installation

Carthage

github "PlugForMac/SimpleGoogleAnalytics" ~> VERSION_NUMBER

CocoaPods

Please create an issue if you'd like CocoaPods support.