The description of easytracker it state the following:
Use TrackedUIViewController to automatically emit pageviews when the view
// associated with the controller appears.
And then if you look at the example they do the following:
#import "EasyTracker.h"
@interface FirstViewController : TrackedUIViewController
However in my case the interface look like this:
@interface MyTableViewController : UITableViewController<FBRequestDelegate,
FBDialogDelegate,UIGestureRecognizerDelegate>{
User *user;
Fam *fam;
}
what should I do to add the tracking?
You can do a manual screens tracking here is google doc for it.
Manual Screen Tracking
To manually track a screen view, call trackView: as in the following example:
id<GAITracker> googleTracker = [[GAI sharedInstance] trackerWithTrackingId:@"YOUR-IUD"];
[googleTracker trackView:@"home screen"];
Well, if you are trying to use a UITableViewController, that likely means you have a table view within your view controller. To keep that functionality, you need to create a table view yourself, and assign your view controller as the data source and delegate of that table view. That way, your view controller will continue to implement the table view's data source and delegate methods. I would suggest using Interface Builder, and dropping a table view onto MyTableViewController.
Your interface would then look something like this:
@interface MyTableViewController : TrackedUIViewController <UITableViewDataSource, UITableViewDelegate>
You'll also most likely find yourself needing to wire up the table view as a property on your view controller.
@property (strong) UITableView *tableView;
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