Reputation: 291
I would like to Integrate Google Analytics Tracking into my IOS APP.
I have integrated Google Analytics Library and Add It To my Application.
cf. https://developers.google.com/analytics/devguides/collection/ios/v2/
into my code to tracking my view contact
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.trackPageView = @"Contact Screen";
//
}
A have this error "Property 'TrackPageView' not found on object of the type 'ContactViewController'"
Upvotes: 4
Views: 4892
Reputation: 1293
If you use Automatic Screen Tracking then you have to do this way:
@Objective C:
Note: Hope you initialize and configured GAI properly into your project.
Upvotes: 0
Reputation: 2207
Today I got the same error, and despite what the setup documentation stated, the property is called screenName
. so Just write this line in your viewDidLoad:
self.screenName = @"A name";
Upvotes: 14
Reputation: 13694
You are trying to set the wrong property (trackPageView
) in your viewDidLoad:
where you should actually be setting the trackedViewName
property. The code should be as follows:
self.trackedViewName = @"Contact Screen";
Also in your header (.h
) file, make sure your @interface
inherits from the GAITrackedViewController
class like so:
@interface YourContactScreenController : GAITrackedViewController
Upvotes: 1