How to implement Google Analytics Gaitrackedviewcontroller for iOS together with Uitableviewcontroller <Nsxmlparserdelegate>?

Asked

Viewed 60 times

1

How to insert the Google Analytics Gaitrackedviewcontroller into the code below without removing the Uitableviewcontroller from this line?

@interface STNavigationViewController:UITableViewController <NSXMLParserDelegate>

Is there such a possibility? In my case I need to implement both resources.

Complete code:

#import <UIKit/UIKit.h>
#import "GAITrackedViewController.h"

@interface STNavigationViewController:UITableViewController <NSXMLParserDelegate> {

}


@property (strong, nonatomic) IBOutlet UITableView *tableView;



-(IBAction)back:(id)sender;


@end
  • 1

    In fact, there is no Google Analytics implementation to overwrite a UITableViewController, what you can try is using this tracker manual in your views.

1 answer

1


The GAITrackerViewController, is nothing more than a "convenience" for the developer not to waste time tracking the Screen View type.

I really think it’s silly to extend the GAITrackerViewController, since it is very simple to tracker a view when it is displayed.

My suggestion for you not to plaster your views controllers on the Google tracker to no longer have this kind of problem is to create a GAI abstraction that can be simple and reusable for any project.

I created a gist that may be useful to you. I didn’t test it because I’m not in my development machine, I just took an excerpt of a previously developed code and adapted it to your need. Break has Flurry too but if you do not need so much just remove.

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.