https://github.com/macpaw/google-analytics-for-os-x
Google Analytics SDK for OS X
https://github.com/macpaw/google-analytics-for-os-x
google-analytics google-analytics-sdk
Last synced: about 1 year ago
JSON representation
Google Analytics SDK for OS X
- Host: GitHub
- URL: https://github.com/macpaw/google-analytics-for-os-x
- Owner: MacPaw
- License: mit
- Archived: true
- Created: 2015-12-15T10:44:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-11-01T12:54:41.000Z (over 8 years ago)
- Last Synced: 2025-05-08T08:46:29.743Z (about 1 year ago)
- Topics: google-analytics, google-analytics-sdk
- Language: Objective-C
- Size: 119 KB
- Stars: 51
- Watchers: 11
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Google-Analytics-for-OS-X
Google Analytics SDK for mac OS
This is an Objective-C wrapper around [Measurement Protocol](https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide)
## Installation
Google-Analytics-for-OS-X is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "Google-Analytics-for-OS-X"
```
Alternatively, you can just clone the repo, build `GoogleAnalyticsTracker` target and use the framework in your project.
## Usage
```
MPAnalyticsConfiguration *configuration = [[MPAnalyticsConfiguration alloc] initWithAnalyticsIdentifier:@"UA-TEST-X"];
[MPGoogleAnalyticsTracker activateConfiguration:configuration];
```
#### Track Event
```
[MPGoogleAnalyticsTracker trackEventOfCategory:@"Interaction" action:@"Button Click"
label:@"Track Event Button" value:@0];
```
#### Track Timing
```
[MPGoogleAnalyticsTracker trackTimingOfCategory:@"Timings" variable:@"App Launch Duration"
time:@100 label:@""];
```
#### Debug Window
There is a special debug window included in the framework. It can be used by developers/QA/marketing for testing.

#License
Google-Analytics-for-OS-X is licensed under the MIT License. See the LICENSE file for more information.