DplusMobClick.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // DplusMobClick.h
  3. // Analytics
  4. //
  5. // Copyright (C) 2010-2016 Umeng.com . All rights reserved.
  6. #import <UIKit/UIKit.h>
  7. #import <Foundation/Foundation.h>
  8. @interface DplusMobClick : NSObject
  9. /** Dplus增加事件
  10. @param eventName 事件名
  11. @param property 自定义属性
  12. */
  13. +(void) track:(NSString *)eventName;
  14. +(void) track:(NSString *)eventName property:(NSDictionary *) property;
  15. /**
  16. * 设置属性 键值对 会覆盖同名的key
  17. * 将该函数指定的key-value写入dplus专用文件;APP启动时会自动读取该文件的所有key-value,并将key-value自动作为后续所有track事件的属性。
  18. */
  19. +(void) registerSuperProperty:(NSDictionary *)property;
  20. /**
  21. *
  22. * 从dplus专用文件中删除指定key-value
  23. @param key
  24. */
  25. +(void) unregisterSuperProperty:(NSString *)propertyName;
  26. /**
  27. *
  28. * 返回dplus专用文件中key对应的value;如果不存在,则返回空。
  29. @param key
  30. @return void
  31. */
  32. +(NSString *)getSuperProperty:(NSString *)propertyName;
  33. /**
  34. * 返回Dplus专用文件中的所有key-value;如果不存在,则返回空。
  35. */
  36. +(NSDictionary *)getSuperProperties;
  37. /**
  38. *清空Dplus专用文件中的所有key-value。
  39. */
  40. +(void)clearSuperProperties;
  41. /**
  42. * 设置预置事件属性 键值对 会覆盖同名的key
  43. */
  44. +(void) registerPreProperties:(NSDictionary *)property;
  45. /**
  46. *
  47. * 删除指定预置事件属性
  48. @param key
  49. */
  50. +(void) unregisterPreProperty:(NSString *)propertyName;
  51. /**
  52. * 获取预置事件所有属性;如果不存在,则返回空。
  53. */
  54. +(NSDictionary *)getPreProperties;
  55. /**
  56. *清空所有预置事件属性。
  57. */
  58. +(void)clearPreProperties;
  59. /**
  60. * 设置关注事件是否首次触发,只关注eventList前五个合法eventID.只要已经保存五个,此接口无效
  61. */
  62. +(void)setFirstLaunchEvent:(NSArray *)eventList;
  63. @end