Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.46 KB

README.md

File metadata and controls

46 lines (30 loc) · 1.46 KB

Google-Analytics-for-OS-X

Google Analytics SDK for mac OS

This is an Objective-C wrapper around Measurement Protocol

Installation

Google-Analytics-for-OS-X is available through CocoaPods. To install it, simply add the following line to your Podfile:

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.

ScreenShot

#License

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