How to use IOS Friends League statistics

Source: Internet
Author: User

This article reproduced to http://blog.csdn.net/woaifen3344/article/details/41284395 Friends League statistics Umanalyticsios Friends League statistics iOS Umanalytics

It is very convenient to use the Friend League statistic function in the project, first of all we have to go to the Friend League open platform to look at the document, not much to say, is to write me a demo

To a friend in need, here I encapsulated the Friends of the statistics function, only need to import this class, it can be very convenient to use:

[OBJC]View Plaincopyprint?
  1. //
  2. HYBUMAnalyticsHelper.h
  3. Umanalyticsdemo
  4. //
  5. Created by Huangyi mark on 14/11/19.
  6. Copyright (c) 2014 Huangyi mark. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. /*!
  10. * @brief AU statistics function related Operations API encapsulation
  11. *
  12. * @author Huangyibiao
  13. */
  14. @interface Hybumanalyticshelper:nsobject
  15. /*!
  16. * Activate the Friends League statistics function
  17. */
  18. + (void) Umanalyticstart;
  19. The viewwillappear call to get the correct page access path, access depth (PV) data
  20. + (void) Beginlogpageview: (__unsafe_unretained Class) PageView;
  21. The viewdiddisappeary call to get the correct page access path, access depth (PV) data
  22. + (void) Endlogpageview: (__unsafe_unretained Class) PageView;
  23. @end


[OBJC]View Plaincopyprint?
  1. //
  2. Hybumanalyticshelper.m
  3. Umanalyticsdemo
  4. //
  5. Created by Huangyi mark on 14/11/19.
  6. Copyright (c) 2014 Huangyi mark. All rights reserved.
  7. //
  8. #import "HYBUMAnalyticsHelper.h"
  9. #import "MobClick.h"
  10. #define Kumanalyticsappkey @ "546c4457fd98c5cb9a00319d"
  11. @implementation Hybumanalyticshelper
  12. + (void) Umanalyticstart {
  13. [Mobclick startwithappkey:kumanalyticsappkey reportpolicy:batch channelid:@ "App Store"];
  14. //Version ID
  15. nsstring *version = [[[NSBundle Mainbundle] infodictionary] objectforkey:@ "  Cfbundleshortversionstring "];
  16. [Mobclick setappversion:version];
  17. #if DEBUG
  18. //Open the Friend League SDK debugging, note that the release needs to comment out this line, reduce IO consumption
  19. [Mobclick setlogenabled:YES];
  20. #endif
  21. return;
  22. }
  23. + (void) Beginlogpageview: (__unsafe_unretained Class) PageView {
  24. [Mobclick Beginlogpageview:nsstringfromclass (PageView)];
  25. return;
  26. }
  27. + (void) Endlogpageview: (__unsafe_unretained Class) PageView {
  28. [Mobclick Endlogpageview:nsstringfromclass (PageView)];
  29. return;
  30. }
  31. @end


To see the source code, go to my github to download it: Https://github.com/632840804/UMAnalyticsDemo

How to use IOS Friends League statistics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.