Track an event based on a selected row of a table through Google Analytics

I'm trying this code to track which row of a table was selected using google analytics

NSString *label=[NSString stringWithFormat:@"Section#%i",indexPath.section]; [[GAI sharedInstance].defaultTracker trackEventWithCategory:@"HOME" withAction:@"Select Row" withLabel:label withValue:[NSNumber numberWithInt:indexPath.row]]; 

But I always get error "No known instance method for selector trackEventWithCategory:withAction:withLabel:with Value:"

Can someone advise me: I want to keep track of which row of the table is selected so that the event can be generated using Google Analytics.

+6
source share
1 answer

I finally got a solution

 id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker]; [tracker send:[[GAIDictionaryBuilder createEventWithCategory:@"BUSINESS DETAILS " action:@"Select Row" // Event action (required) label:@"Selected" // Event label value:[NSNumber numberWithInt:indexPath.row]] build]]; 
+3
source

All Articles