I have been trying this code to track which row of the table is been 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 the error "No known instance method for selector trackEventWithCategory:withAction:withLabel:with Value:"
Can anyone please guide me: I want to track which row of the table is selected so an event can be created using google analytics.
Events in Google Analytics 4 This means that when you create a new GA4 property and data stream, basic user interactions such as outbound link clicks, scrolls, file downloads, video engagement, and site search are automatically tracked.
An event allows you to measure a distinct user interaction on a website or app. For example, loading a page, clicking a link, and completing a purchase are all interactions you can measure with events. If you're migrating from Universal Analytics, read this migration guide instead.
I finally got the 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]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With