photo-ios/Frameworks/Google Analytics SDK/Examples/BasicExample/Classes/FirstViewController.m
2012-10-25 15:55:28 +02:00

31 lines
788 B
Objective-C

//
// FirstViewController.m
// BasicExample
//
// Created by Farooq Mela on 4/10/12.
// Copyright 2012 Google, Inc. All rights reserved.
//
#import "FirstViewController.h"
#import "GANTracker.h"
@implementation FirstViewController
@synthesize button = button_;
- (void)viewDidAppear:(BOOL)animated {
NSLog(@"First View appeared!");
[[GANTracker sharedTracker] trackPageview:@"FirstView" withError:nil];
[super viewDidAppear:animated];
}
- (IBAction)buttonClicked:(id)sender {
NSLog(@"First View button clicked!");
[[GANTracker sharedTracker] trackEvent:@"Button"
action:@"Click"
label:@"First Button"
value:-1
withError:nil];
}
@end