Umeng add page statistics, umeng page
Umeng's statistics are still quite powerful. Although the project does not require relevant functions, related statistics are still added, and a line of code must be added to viewWillAppear and viewWillDisappear in the corresponding ViewController, input the name of the current page. At first, only a few pages are added, so the code is written to death. To add statistics to all pages, you need to improve the Code and encapsulate it in your own BaseViewController.
-(Void) beginLogPageView
{
[MobClick beginLogPageView: NSStringFromClass ([self class])];
}
-(Void) endLogPageView;
{
[MobClick endLogPageView: NSStringFromClass ([self class])];
}
It is easy to call statistics on the subpage.
-(Void) viewWillAppear :( BOOL) animated {
[Super viewWillAppear: animated];
// Add page statistics
[Self beginLogPageView];
}
-(Void) viewWillDisappear :( BOOL) animated {
[Super viewWillDisappear: animated];
// End page statistics
[Self endLogPageView];
}