Game Analytics.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /******************************************************************************
  2. This is a wrapper for "Game Analytics" - https://gameanalytics.com/
  3. For documentation and usage please refer to the official "Game Analytics" pages:
  4. Docs - https://gameanalytics.com/docs
  5. iOS - https://gameanalytics.com/docs/item/ios-sdk
  6. Android - https://gameanalytics.com/docs/item/android-sdk
  7. /******************************************************************************/
  8. #define GameAnalytics _GameAnalytics
  9. namespace GameAnalytics
  10. {
  11. enum GAResourceFlowType
  12. {
  13. GAResourceFlowTypeSource=1,
  14. GAResourceFlowTypeSink =2,
  15. };
  16. enum GAProgressionStatus
  17. {
  18. GAProgressionStatusStart =1,
  19. GAProgressionStatusComplete=2,
  20. GAProgressionStatusFail =3,
  21. };
  22. enum GAErrorSeverity
  23. {
  24. GAErrorSeverityDebug =1,
  25. GAErrorSeverityInfo =2,
  26. GAErrorSeverityWarning =3,
  27. GAErrorSeverityError =4,
  28. GAErrorSeverityCritical=5,
  29. };
  30. void configureAvailableCustomDimensions01(C MemPtr<Str> &customDimensions);
  31. void configureAvailableCustomDimensions02(C MemPtr<Str> &customDimensions);
  32. void configureAvailableCustomDimensions03(C MemPtr<Str> &customDimensions);
  33. void configureAvailableResourceCurrencies(C MemPtr<Str> &resourceCurrencies);
  34. void configureAvailableResourceItemTypes (C MemPtr<Str> &resourceItemTypes);
  35. void configureBuild(C Str &build);
  36. void configureUserId(C Str &userId);
  37. void configureEngineVersion(C Str &engineVersion=ENGINE_BUILD);
  38. void initialize(C Str &gameKey, C Str &gameSecret);
  39. void addBusinessEventWithCurrency(C Str &currency, Int amount, C Str &itemType, C Str &itemId, C Str &cartType, C Str &receipt);
  40. void addBusinessEventWithCurrency(C Str &currency, Int amount, C Str &itemType, C Str &itemId, C Str &cartType, Bool autoFetchReceipt);
  41. void addResourceEventWithFlowType(GAResourceFlowType flowType, C Str &currency, Dbl amount, C Str &itemType, C Str &itemId);
  42. void addProgressionEventWithProgressionStatus(GAProgressionStatus progressionStatus, C Str &progression01, C Str &progression02, C Str &progression03);
  43. void addProgressionEventWithProgressionStatus(GAProgressionStatus progressionStatus, C Str &progression01, C Str &progression02, C Str &progression03, Int score);
  44. void addDesignEventWithEventId(C Str &eventId);
  45. void addDesignEventWithEventId(C Str &eventId, Dbl value);
  46. void addErrorEventWithSeverity(GAErrorSeverity severity, C Str &message);
  47. Str getCommandCenterValueAsString(C Str &key);
  48. Str getCommandCenterValueAsString(C Str &key, C Str &defaultValue);
  49. Str getCommandCenterConfigurations();
  50. #if EE_PRIVATE
  51. //void setCommandCenterDelegate(id newDelegate);
  52. #endif
  53. Bool isCommandCenterReady();
  54. void setEnabledInfoLog(Bool flag);
  55. void setEnabledVerboseLog(Bool flag);
  56. void setEnabledManualSessionHandling(Bool flag);
  57. void startSession();
  58. void endSession();
  59. void setCustomDimension01(C Str &dimension01);
  60. void setCustomDimension02(C Str &dimension02);
  61. void setCustomDimension03(C Str &dimension03);
  62. void setFacebookId(C Str &facebookId);
  63. void setGender(C Str &gender);
  64. void setBirthYear(Int birthYear);
  65. }
  66. /******************************************************************************/