@thinkingai/ae-cli 6.0.57 → 6.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/README.md +10 -5
  2. package/README.zh.md +10 -5
  3. package/bin/ai-monitor.js +2 -0
  4. package/dist/ai-monitor-FCXSLHAP.js +32 -0
  5. package/dist/ai-monitor.js +135 -0
  6. package/dist/{auth-YEIJLBFY.js → auth-ATK2SLEV.js} +12 -11
  7. package/dist/{automation-NAR5DDGL.js → automation-FLCPFMN4.js} +5 -5
  8. package/dist/{capability-P7DD4Q73.js → capability-6KTSOI7L.js} +32 -36
  9. package/dist/{chunk-JCWM2TYP.js → chunk-2ETRY2CU.js} +16 -16
  10. package/dist/{chunk-IN7KKL6K.js → chunk-2F64AZYH.js} +1 -1
  11. package/dist/{chunk-JNVVJ273.js → chunk-4PSTYEG5.js} +5 -10
  12. package/dist/{chunk-QEMQKVHW.js → chunk-5E7MTTFN.js} +3 -3
  13. package/dist/{chunk-RJHGDWSC.js → chunk-5M5LBRR3.js} +2 -2
  14. package/dist/chunk-6M7ZEDT2.js +182 -0
  15. package/dist/{chunk-KPQY44JQ.js → chunk-AWW2T2WL.js} +3 -0
  16. package/dist/chunk-AXTO4FTM.js +1285 -0
  17. package/dist/{chunk-TKVVACEJ.js → chunk-BEYLCUZX.js} +17 -12
  18. package/dist/chunk-CF6JTT2U.js +64 -0
  19. package/dist/{chunk-N6XBLRB7.js → chunk-F2VFZUGG.js} +2 -2
  20. package/dist/{chunk-ZGIYG473.js → chunk-HSZAIPUX.js} +48 -13
  21. package/dist/{chunk-H3K5UGYC.js → chunk-HTZ2MLYA.js} +48 -22
  22. package/dist/{chunk-QZUVLFNR.js → chunk-HVMCPKOZ.js} +1 -1
  23. package/dist/{chunk-7JAVT5TK.js → chunk-KTJXD27G.js} +2 -2
  24. package/dist/{chunk-TULINOLS.js → chunk-LOR4IA26.js} +565 -315
  25. package/dist/{chunk-YVG6QD3V.js → chunk-P7QDCWJ6.js} +98 -7
  26. package/dist/{chunk-7ABK2PEJ.js → chunk-SDKW6LYE.js} +88 -36
  27. package/dist/{chunk-752BSLZC.js → chunk-VJUXKVRE.js} +1 -1
  28. package/dist/chunk-VRMGHQKE.js +556 -0
  29. package/dist/{compat-check-PMEGUPZU.js → compat-check-XD2U7PZ2.js} +3 -3
  30. package/dist/{config-VWVPR4WW.js → config-U3GDWU6E.js} +26 -13
  31. package/dist/{context-F6FCGTF3.js → context-YAQG6YQC.js} +3 -3
  32. package/dist/{data-integration-6UAZO4GG.js → data-integration-QE37EQ3A.js} +1 -1
  33. package/dist/{evaluation-4LO2O4AF.js → evaluation-2JSF4V47.js} +13 -158
  34. package/dist/index.js +87 -582
  35. package/dist/{memory-HHPX3NF2.js → memory-WEB27VI6.js} +8 -8
  36. package/dist/{metadata-HEQQEEG3.js → metadata-7FYE4234.js} +8 -8
  37. package/dist/{model-7UHGWYVR.js → model-T7H7Q6BG.js} +3 -3
  38. package/dist/{personal-semantic-preference-V4L6ZWR2.js → personal-semantic-preference-O6VXM74A.js} +7 -7
  39. package/dist/{project-semantic-NKHKJX6M.js → project-semantic-2GGFJWW6.js} +16 -14
  40. package/dist/{sync-ZJMXCRIN.js → sync-ULBB7WO5.js} +5 -5
  41. package/dist/{te-agent-WBKIFEQD.js → te-agent-6RMF7LUV.js} +6 -6
  42. package/dist/{te-analysis-ADX7RKO4.js → te-analysis-HSYC7GNV.js} +383 -194
  43. package/dist/{te-community-PREDRXG3.js → te-community-FLKZGQKB.js} +10 -10
  44. package/dist/{te-dataops-ITWJHO2U.js → te-dataops-OQQGTCUA.js} +5 -5
  45. package/dist/{te-engage-VE2NUH5V.js → te-engage-RIEBHL5T.js} +10 -10
  46. package/dist/{te-kb-WSMOW7WS.js → te-kb-4HG2FMHJ.js} +19 -10
  47. package/dist/{te-system-YM657FKO.js → te-system-AL4B4XZL.js} +3 -3
  48. package/dist/{te-team-T2WRLOOD.js → te-team-5O4UVUWE.js} +6 -6
  49. package/dist/{things-6QOMFXOG.js → things-TSJ64GBT.js} +6 -6
  50. package/dist/{update-I4MOUYOX.js → update-Q5LURAWV.js} +4 -4
  51. package/dist/{workspace-LYDAP647.js → workspace-FF2HXJGR.js} +5 -5
  52. package/package.json +8 -6
  53. package/skills/ae-ai-monitor/SKILL.md +179 -0
  54. package/skills/ae-ai-monitor/references/read-commands.md +866 -0
  55. package/skills/ae-analysis/SKILL.md +10 -4
  56. package/skills/ae-analysis/references/adhoc_export.md +3 -1
  57. package/skills/ae-analysis/references/ai_models.md +1 -0
  58. package/skills/ae-analysis/references/analysis_gateway_assets.md +2 -0
  59. package/skills/ae-analysis/references/asset_search.md +1 -1
  60. package/skills/ae-analysis/references/bad_case_begin.md +12 -0
  61. package/skills/ae-analysis/references/bad_case_get.md +12 -0
  62. package/skills/ae-analysis/references/bad_case_history.md +12 -0
  63. package/skills/ae-analysis/references/bad_case_list.md +12 -0
  64. package/skills/ae-analysis/references/bad_case_review.md +51 -0
  65. package/skills/ae-analysis/references/bad_case_run.md +12 -0
  66. package/skills/ae-analysis/references/bad_case_submit.md +12 -0
  67. package/skills/ae-analysis/references/bad_case_submit_to_page.md +12 -0
  68. package/skills/ae-analysis/references/bad_case_sync_evaluation.md +11 -0
  69. package/skills/ae-analysis/references/bi_panel_list.md +1 -1
  70. package/skills/ae-analysis/references/bi_panel_share.md +3 -1
  71. package/skills/ae-analysis/references/catalog_list.md +2 -0
  72. package/skills/ae-analysis/references/command_index.md +38 -29
  73. package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
  74. package/skills/ae-analysis/references/dashboard_handover.md +3 -1
  75. package/skills/ae-analysis/references/dashboard_list.md +3 -3
  76. package/skills/ae-analysis/references/dashboard_report_data_export.md +1 -1
  77. package/skills/ae-analysis/references/dashboard_share.md +3 -1
  78. package/skills/ae-analysis/references/dashboard_update.md +3 -2
  79. package/skills/ae-analysis/references/filter_value_list.md +2 -0
  80. package/skills/ae-analysis/references/folder_share.md +8 -2
  81. package/skills/ae-analysis/references/governance_recommendation_run_update.md +3 -1
  82. package/skills/ae-analysis/references/project_data_power_upsert.md +3 -1
  83. package/skills/ae-analysis/references/project_mark_time_create.md +2 -0
  84. package/skills/ae-analysis/references/project_mark_time_update.md +2 -0
  85. package/skills/ae-analysis/references/project_member_add.md +3 -1
  86. package/skills/ae-analysis/references/project_member_batch_update.md +3 -1
  87. package/skills/ae-analysis/references/project_member_handover_run.md +3 -1
  88. package/skills/ae-analysis/references/project_member_update.md +3 -1
  89. package/skills/ae-analysis/references/project_owner_update.md +3 -1
  90. package/skills/ae-analysis/references/project_role_upsert.md +5 -3
  91. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +16 -1
  92. package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +14 -1
  93. package/skills/ae-analysis/references/project_space_share.md +8 -2
  94. package/skills/ae-analysis/references/property_get.md +2 -0
  95. package/skills/ae-analysis/references/public_link_list.md +3 -1
  96. package/skills/ae-analysis/references/query_cancel.md +4 -1
  97. package/skills/ae-analysis/references/report_data_run.md +1 -1
  98. package/skills/ae-analysis/references/report_list.md +3 -3
  99. package/skills/ae-analysis/references/scenario_append.md +2 -2
  100. package/skills/ae-analysis/references/scenario_collect.md +15 -4
  101. package/skills/ae-analysis/references/scenario_list.md +2 -1
  102. package/skills/ae-analysis/references/system_oauth2_update.md +3 -1
  103. package/skills/ae-analysis/references/system_third_party_login_upsert.md +4 -2
  104. package/skills/ae-analysis/references/user_tag_create.md +4 -1
  105. package/skills/ae-analysis/references/user_tag_get.md +2 -0
  106. package/skills/ae-analysis/references/user_tag_models.md +8 -2
  107. package/skills/ae-analysis/references/user_tag_update.md +5 -2
  108. package/skills/ae-analysis/references/virtual_property_create.md +12 -1
  109. package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +10 -0
  110. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +55 -13
  111. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +2 -2
  112. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +2 -2
  113. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +7 -1
  114. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/wait-compile-run.mjs +79 -0
  115. package/skills/ae-automation/SKILL.md +4 -2
  116. package/skills/ae-capability/SKILL.md +9 -5
  117. package/skills/ae-community/SKILL.md +1 -0
  118. package/skills/ae-dataops/SKILL.md +1 -0
  119. package/skills/ae-engage/SKILL.md +1 -0
  120. package/skills/ae-evaluation/SKILL.md +17 -2
  121. package/skills/ae-generate-tracking-plan/SKILL.md +5 -0
  122. package/skills/ae-kb/SKILL.md +9 -5
  123. package/skills/ae-kb/references/analysis-workflow.md +11 -2
  124. package/skills/ae-kb/references/query-workflow.md +9 -6
  125. package/skills/ae-kb/references/versions.md +1 -1
  126. package/skills/ae-kb-discovery/SKILL.md +15 -6
  127. package/skills/ae-metadata/SKILL.md +1 -0
  128. package/skills/ae-migrate-tracking-code/SKILL.md +2 -1
  129. package/skills/ae-team/SKILL.md +1 -1
  130. package/skills/ae-tracking-matrix/SKILL.md +170 -0
  131. package/skills/ae-tracking-matrix/assets//345/237/213/347/202/271/346/250/241/347/211/210.xlsx +0 -0
  132. package/skills/ae-tracking-matrix/i18n.yaml +12 -0
  133. package/skills/ae-tracking-matrix/references/ae-capabilities.md +93 -0
  134. package/skills/ae-tracking-matrix/references/business-semantic-checks.md +30 -0
  135. package/skills/ae-tracking-matrix/references/categories/acquaintance_social_tracking_plan_template.md +256 -0
  136. package/skills/ae-tracking-matrix/references/categories/blockchain_game_tracking_plan_template.md +213 -0
  137. package/skills/ae-tracking-matrix/references/categories/card_game_tracking_plan_template.md +407 -0
  138. package/skills/ae-tracking-matrix/references/categories/casual_game_tracking_plan_template.md +218 -0
  139. package/skills/ae-tracking-matrix/references/categories/casual_music.md +112 -0
  140. package/skills/ae-tracking-matrix/references/categories/chess_cards_tracking_plan_template.md +301 -0
  141. package/skills/ae-tracking-matrix/references/categories/ecommerce_tracking_plan_template.md +356 -0
  142. package/skills/ae-tracking-matrix/references/categories/fishing.md +775 -0
  143. package/skills/ae-tracking-matrix/references/categories/game_basic_module_tracking_plan.md +89 -0
  144. package/skills/ae-tracking-matrix/references/categories/idle_card.md +27 -0
  145. package/skills/ae-tracking-matrix/references/categories/idle_game_tracking_plan_template.md +415 -0
  146. package/skills/ae-tracking-matrix/references/categories/interactive_video.md +133 -0
  147. package/skills/ae-tracking-matrix/references/categories/merge.md +639 -0
  148. package/skills/ae-tracking-matrix/references/categories/mmo_mobile_tracking_plan_template.md +406 -0
  149. package/skills/ae-tracking-matrix/references/categories/mmo_web.md +230 -0
  150. package/skills/ae-tracking-matrix/references/categories/music.md +137 -0
  151. package/skills/ae-tracking-matrix/references/categories/online_education_tracking_plan_template.md +414 -0
  152. package/skills/ae-tracking-matrix/references/categories/qipai_mj.md +199 -0
  153. package/skills/ae-tracking-matrix/references/categories/reading_tracking_plan_template.md +158 -0
  154. package/skills/ae-tracking-matrix/references/categories/roguelike_tracking_plan_template.md +546 -0
  155. package/skills/ae-tracking-matrix/references/categories/rpg.md +195 -0
  156. package/skills/ae-tracking-matrix/references/categories/short_drama_tracking_plan_template.md +115 -0
  157. package/skills/ae-tracking-matrix/references/categories/simulation_business_tracking_plan_template.md +151 -0
  158. package/skills/ae-tracking-matrix/references/categories/slg_tracking_plan_template.md +260 -0
  159. package/skills/ae-tracking-matrix/references/categories/slots_tracking_plan_template.md +232 -0
  160. package/skills/ae-tracking-matrix/references/categories/stranger_social_tracking_plan_template.md +359 -0
  161. package/skills/ae-tracking-matrix/references/categories/tower_defense.md +365 -0
  162. package/skills/ae-tracking-matrix/references/categories/video_editor_tracking_plan_template.md +211 -0
  163. package/skills/ae-tracking-matrix/references/categories/wechat_minigame.md +132 -0
  164. package/skills/ae-tracking-matrix/references/category-registry.md +77 -0
  165. package/skills/ae-tracking-matrix/references/data-verification/diagnosis_kb.md +230 -0
  166. package/skills/ae-tracking-matrix/references/data-verification/sql_checks.md +406 -0
  167. package/skills/ae-tracking-matrix/references/data-verification/tracking_plan_comparison.md +128 -0
  168. package/skills/ae-tracking-matrix/references/eval-cases.md +74 -0
  169. package/skills/ae-tracking-matrix/references/naming-dict.md +238 -0
  170. package/skills/ae-tracking-matrix/references/optimization-checklist.md +85 -0
  171. package/skills/ae-tracking-matrix/references/plan-generation/export-schema.md +142 -0
  172. package/skills/ae-tracking-matrix/references/plan-generation/module-baseline.md +47 -0
  173. package/skills/ae-tracking-matrix/references/plan-generation/reference.md +794 -0
  174. package/skills/ae-tracking-matrix/references/plan-generation/template-catalog.md +94 -0
  175. package/skills/ae-tracking-matrix/references/scene-routing.md +80 -0
  176. package/skills/ae-tracking-matrix/references/sdk/client-sdk/android.md +3787 -0
  177. package/skills/ae-tracking-matrix/references/sdk/client-sdk/c.md +827 -0
  178. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-lua.md +655 -0
  179. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-x.md +953 -0
  180. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocoscreator.md +1128 -0
  181. package/skills/ae-tracking-matrix/references/sdk/client-sdk/corona.md +714 -0
  182. package/skills/ae-tracking-matrix/references/sdk/client-sdk/egret.md +1268 -0
  183. package/skills/ae-tracking-matrix/references/sdk/client-sdk/flutter.md +776 -0
  184. package/skills/ae-tracking-matrix/references/sdk/client-sdk/h5-and-app-sdk-integration.md +182 -0
  185. package/skills/ae-tracking-matrix/references/sdk/client-sdk/ios.md +2755 -0
  186. package/skills/ae-tracking-matrix/references/sdk/client-sdk/javascript.md +1182 -0
  187. package/skills/ae-tracking-matrix/references/sdk/client-sdk/layaair.md +1300 -0
  188. package/skills/ae-tracking-matrix/references/sdk/client-sdk/macos.md +1369 -0
  189. package/skills/ae-tracking-matrix/references/sdk/client-sdk/mini-program-mini-game.md +1692 -0
  190. package/skills/ae-tracking-matrix/references/sdk/client-sdk/openharmony.md +902 -0
  191. package/skills/ae-tracking-matrix/references/sdk/client-sdk/react-native.md +763 -0
  192. package/skills/ae-tracking-matrix/references/sdk/client-sdk/uni-app.md +1107 -0
  193. package/skills/ae-tracking-matrix/references/sdk/client-sdk/unity.md +1532 -0
  194. package/skills/ae-tracking-matrix/references/sdk/client-sdk/unreal.md +845 -0
  195. package/skills/ae-tracking-matrix/references/sdk/faq/android_sdk_faq.md +228 -0
  196. package/skills/ae-tracking-matrix/references/sdk/faq/ios_sdk_faq.md +149 -0
  197. package/skills/ae-tracking-matrix/references/sdk/faq/java_sdk_faq.md +407 -0
  198. package/skills/ae-tracking-matrix/references/sdk/faq/javascript_sdk_faq.md +163 -0
  199. package/skills/ae-tracking-matrix/references/sdk/faq/minigame_sdk_faq.md +149 -0
  200. package/skills/ae-tracking-matrix/references/sdk/faq/miniprogram_sdk_faq.md +153 -0
  201. package/skills/ae-tracking-matrix/references/sdk/faq/python_sdk_faq.md +232 -0
  202. package/skills/ae-tracking-matrix/references/sdk/faq/sdk_log_guide.md +314 -0
  203. package/skills/ae-tracking-matrix/references/sdk/faq/sdk_usage_notes.md +117 -0
  204. package/skills/ae-tracking-matrix/references/sdk/faq/unity_sdk_faq.md +148 -0
  205. package/skills/ae-tracking-matrix/references/sdk/integration-tools/filebeat-logstash-guide.md +645 -0
  206. package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_guide.md +307 -0
  207. package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_parser_plugin.md +347 -0
  208. package/skills/ae-tracking-matrix/references/sdk/integration-tools/restful_api_notes.md +72 -0
  209. package/skills/ae-tracking-matrix/references/sdk/integration-tools/ta-datax-writer-guide.md +264 -0
  210. package/skills/ae-tracking-matrix/references/sdk/server-sdk/c.md +566 -0
  211. package/skills/ae-tracking-matrix/references/sdk/server-sdk/erlang.md +409 -0
  212. package/skills/ae-tracking-matrix/references/sdk/server-sdk/golang.md +446 -0
  213. package/skills/ae-tracking-matrix/references/sdk/server-sdk/java.md +557 -0
  214. package/skills/ae-tracking-matrix/references/sdk/server-sdk/lua.md +457 -0
  215. package/skills/ae-tracking-matrix/references/sdk/server-sdk/nodejs.md +490 -0
  216. package/skills/ae-tracking-matrix/references/sdk/server-sdk/php.md +523 -0
  217. package/skills/ae-tracking-matrix/references/sdk/server-sdk/python.md +484 -0
  218. package/skills/ae-tracking-matrix/references/sdk/server-sdk/ruby.md +442 -0
  219. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/data-rules.md +391 -0
  220. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/first-event-validation.md +91 -0
  221. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/preset-properties-system-fields.md +635 -0
  222. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/updatable-events.md +113 -0
  223. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/user-identification-rules.md +466 -0
  224. package/skills/ae-tracking-matrix/references/standard-base/README.md +22 -0
  225. package/skills/ae-tracking-matrix/references/standard-base/basic_event_data.md +174 -0
  226. package/skills/ae-tracking-matrix/references/standard-base/common_event_properties.md +20 -0
  227. package/skills/ae-tracking-matrix/references/standard-base/common_event_properties_setup.md +7 -0
  228. package/skills/ae-tracking-matrix/references/standard-base/data_type_design_principles.md +14 -0
  229. package/skills/ae-tracking-matrix/references/standard-base/gameplay_event_data.md +370 -0
  230. package/skills/ae-tracking-matrix/references/standard-base/id_system_faq.md +47 -0
  231. package/skills/ae-tracking-matrix/references/standard-base/integration_must_know.md +37 -0
  232. package/skills/ae-tracking-matrix/references/standard-base/multi_platform_integration_notes.md +27 -0
  233. package/skills/ae-tracking-matrix/references/standard-base/multi_user_id_system_recommendations.md +23 -0
  234. package/skills/ae-tracking-matrix/references/standard-base/tracking_notes.md +14 -0
  235. package/skills/ae-tracking-matrix/references/standard-base/user_data.md +46 -0
  236. package/skills/ae-tracking-matrix/references/standard-base/user_id_system.md +13 -0
  237. package/skills/ae-tracking-matrix/references/system-fields.md +297 -0
  238. package/skills/ae-tracking-matrix/references/te-field-translations.md +1791 -0
  239. package/skills/ae-tracking-matrix/references/workflows/data-verification.md +232 -0
  240. package/skills/ae-tracking-matrix/references/workflows/feasibility-analysis.md +829 -0
  241. package/skills/ae-tracking-matrix/references/workflows/integration-qna.md +355 -0
  242. package/skills/ae-tracking-matrix/references/workflows/plan-generation.md +283 -0
  243. package/skills/ae-tracking-matrix/references/workflows/plan-lint.md +168 -0
  244. package/skills/ae-tracking-matrix/references/workflows/plan-review-optimize.md +205 -0
  245. package/skills/ae-tracking-matrix/references/workflows/prd-to-suggestions.md +75 -0
  246. package/skills/ae-tracking-matrix/references/workflows/troubleshooting.md +36 -0
  247. package/skills/ae-tracking-matrix/references/workflows/validated-upload.md +107 -0
  248. package/skills/ae-tracking-matrix/scripts/build_template_catalog.py +114 -0
  249. package/skills/ae-tracking-matrix/scripts/export_tracking_plan.py +53 -0
  250. package/skills/ae-tracking-matrix/scripts/finalize_plan.py +166 -0
  251. package/skills/ae-tracking-matrix/scripts/lint_tracking_plan.py +674 -0
  252. package/skills/ae-tracking-matrix/scripts/plan_contract.py +200 -0
  253. package/skills/ae-tracking-matrix/scripts/plan_types.py +60 -0
  254. package/skills/ae-tracking-matrix/scripts/prepare_delivery.py +169 -0
  255. package/skills/ae-tracking-matrix/scripts/sync_plan.py +296 -0
  256. package/skills/ae-tracking-matrix/scripts/upload_plan.py +340 -0
  257. package/dist/chunk-AMBFK2K3.js +0 -28
@@ -0,0 +1,557 @@
1
+ ---
2
+ code: java_sdk_installation
3
+ name: "Java"
4
+ wikiToken: SMGDw5xMCiGynekTD0ccp9OJnQd
5
+ parentWikiToken: O3YxwgHGiiEnvYkHCcIcX51inkf
6
+ updateTime: 1767773958000
7
+ sourceUrl: https://docs-v2.thinkingdata.cn/?version=6.0&lan=zh-CN&code=java_sdk_installation
8
+ ---
9
+
10
+ # Java
11
+
12
+ ::: tip Note
13
+
14
+ Before integration, please read the Pre-Integration Guide first.
15
+
16
+ Java SDK minimum compatibility: JDK 8
17
+
18
+ :::
19
+
20
+ **Latest Version**: v3.0.4-beta.1
21
+
22
+ **Update Date**: 2026-01-07
23
+
24
+ **Download**: Source Code
25
+
26
+ ::: warning Note
27
+
28
+ This document applies to v3.0.0 and later versions. For historical versions, please refer to Java SDK Integration Guide (V2).
29
+
30
+ The SDK API is thread-safe and defaults to synchronous calls. When reporting large amounts of data, you can call the API in a sub-thread to avoid affecting business threads.
31
+
32
+ :::
33
+
34
+ ### 1. SDK Integration
35
+
36
+ 1. To integrate SDK using Maven, add the following dependency information in your `pom.xml` file:
37
+
38
+ ```
39
+ <dependencies>
40
+ // others...
41
+ <dependency>
42
+ <groupId>cn.thinkingdata</groupId>
43
+ <artifactId>thinkingdatasdk</artifactId>
44
+ <version>3.0.2</version>
45
+ </dependency>
46
+ </dependencies>
47
+ ```
48
+
49
+ 2. Install LogBus
50
+
51
+ We recommend using SDK + LogBus for server-side data collection and reporting. You can refer to the following documentation for LogBus installation: LogBus User Guide.
52
+
53
+ ### 2. Initialization
54
+
55
+ #### Method 1
56
+
57
+ ```
58
+ TDAnalytics te = new TDAnalytics(new TDLoggerConsumer("LOG_DIRECTORY"), false);
59
+ ```
60
+
61
+ `LOG_DIRECTORY` is the folder path where data is written.
62
+
63
+ #### Method 2
64
+
65
+ The SDK supports passing configuration for initialization. You can finely control SDK functionality through configuration. For example, you can add a prefix to log files.
66
+
67
+ ```
68
+ TDLoggerConsumer.Config config = new TDLoggerConsumer.Config("LOG_DIRECTORY");
69
+ config.setFilenamePrefix("unique_name");
70
+ TDAnalytics te = new TDAnalytics(new TDLoggerConsumer(config), false);
71
+ ```
72
+
73
+ ### 3. Common Features
74
+
75
+ To ensure successful binding of visitor ID and account ID, if your game uses both visitor ID and account ID, we strongly recommend uploading both IDs. Otherwise, account matching issues may occur, leading to duplicate user counts. For specific ID binding rules, please refer to the User Identification Rules chapter.
76
+
77
+ #### 3.1 Track Events
78
+
79
+ You can call `track` to upload events. We recommend setting event properties and sending conditions based on your previously documented requirements. Here is sample code for tracking events:
80
+
81
+ ```
82
+ // Set event properties
83
+ HashMap<String,Object> properties = new HashMap<>();
84
+ // Set user IP address, TE system will parse user geographic location based on IP
85
+ properties.put("#ip", "192.168.1.1");// String
86
+ properties.put("channel","te");// String
87
+ properties.put("age",1);// Number
88
+ properties.put("isSuccess",true);// Boolean
89
+ properties.put("birthday",new Date());// Date
90
+
91
+ HashMap<String,Object> object = new HashMap<>();
92
+ object.put("key", "value");
93
+ properties.put("object",object);// Object
94
+
95
+ HashMap<String,Object> object1 = new HashMap<>();
96
+ object1.put("key", "value");
97
+
98
+ ArrayList<Object> arr = new ArrayList<>();
99
+ arr.add(object1);
100
+ properties.put("object_arr",arr);// Object Array
101
+
102
+ ArrayList<String> arr1 = new ArrayList<>();
103
+ arr1.add("value");
104
+ properties.put("arr",arr1);// Array
105
+
106
+ try {
107
+ te.track("account_id","distinct_id","payment",properties);
108
+ } catch (Exception e) {
109
+ System.out.println("except:"+e);
110
+ }
111
+ ```
112
+
113
+ - Event name must be a string type, starting with a letter, containing numbers, letters, and underscores "\_", with maximum length of 50 characters.
114
+ - Key is the property name, must be a string type, starting with a letter, containing numbers, letters, and underscores "\_", with maximum length of 50 characters. Case-insensitive, TE will convert to lowercase.
115
+ - Value is the property value, supporting strings, numbers, booleans, dates, objects, object arrays, and arrays.
116
+
117
+ **User property requirements are consistent with event property requirements**
118
+
119
+ #### 3.2 Set User Properties
120
+
121
+ For general user properties, you can call `userSet` to set them. Properties uploaded via this interface will overwrite existing property values. If the user property does not exist previously, a new user property will be created with the same type as the uploaded property. Here is an example of setting a username:
122
+
123
+ ```
124
+ // At this point, username is "TA"
125
+ Map<String,Object> userProperties = new HashMap<String,Object>();
126
+ userProperties.put("user_name", "TA");
127
+ try {
128
+ te.userSet("account_id","distinct_id",userProperties);
129
+ } catch (Exception e) {
130
+ System.out.println("except:"+e);
131
+ }
132
+
133
+ // At this point, userName is "TE"
134
+ Map<String,Object> newUserProperties = new HashMap<String,Object>();
135
+ newUserProperties.put("user_name", "TE");
136
+ try {
137
+ te.userSet("account_id","distinct_id",newUserProperties);
138
+ } catch (Exception e) {
139
+ System.out.println("except:"+e);
140
+ }
141
+ ```
142
+
143
+ #### 3.3 Data Reporting
144
+
145
+ When using TDLogConsumer, collected events are first encoded into JSON strings and added to cache. Data is written to disk only when the cache string length exceeds the set length. Default maximum length is 8192 bytes.
146
+
147
+ In certain business scenarios, if you want data to be reported to the TE server immediately, you can call the `flush()` interface. Note that frequent calls to `flush()` will cause service performance degradation.
148
+
149
+ ```
150
+ te.flush();
151
+ ```
152
+
153
+ #### 3.4 Close SDK
154
+
155
+ ```
156
+ try{
157
+ te.close();
158
+ } catch (Exception e) {
159
+ System.out.println("except:"+e);
160
+ }
161
+ ```
162
+
163
+ Close and exit the SDK. Please call this interface before shutting down the server to avoid data loss in the cache.
164
+
165
+ ### 4. Best Practices
166
+
167
+ The following sample code includes all the above operations. We recommend using it as follows:
168
+
169
+ ```
170
+ // Initialize SDK, LOG_DIRECTORY is the local folder address for writing
171
+ TDAnalytics te = new TDAnalytics(new TDLoggerConsumer("LOG_DIRECTORY"), false);
172
+
173
+ // Set event properties
174
+ HashMap<String,Object> properties = new HashMap<>();
175
+ // Set user IP address, TE system will parse user geographic location based on IP
176
+ properties.put("#ip", "192.168.1.1");// String
177
+ properties.put("channel","te");// String
178
+ properties.put("age",1);// Number
179
+ properties.put("isSuccess",true);// Boolean
180
+ properties.put("birthday",new Date());// Date
181
+
182
+ HashMap<String,Object> object = new HashMap<>();
183
+ object.put("key", "value");
184
+ properties.put("object",object);// Object
185
+
186
+ HashMap<String,Object> object1 = new HashMap<>();
187
+ object1.put("key", "value");
188
+
189
+ ArrayList<Object> arr = new ArrayList<>();
190
+ arr.add(object1);
191
+ properties.put("object_arr",arr);// Object Array
192
+
193
+ ArrayList<String> arr1 = new ArrayList<>();
194
+ arr1.add("value");
195
+ properties.put("arr",arr1);// Array
196
+
197
+ try {
198
+ te.track("account_id","distinct_id","payment",properties);
199
+ } catch (Exception e) {
200
+ System.out.println("except:"+e);
201
+ }
202
+
203
+ // Set user properties
204
+ Map<String,Object> userProperties = new HashMap<String,Object>();
205
+ userProperties.put("user_name", "TE");
206
+ try {
207
+ te.userSet("account_id","distinct_id",userProperties);
208
+ } catch (Exception e) {
209
+ System.out.println("except:"+e);
210
+ }
211
+ ```
212
+
213
+ ---
214
+
215
+ # Advanced Guide
216
+
217
+ ### 1. Track Events
218
+
219
+ After SDK initialization, you can perform data tracking to collect user behavior information. Generally, regular events can meet business scenario requirements. You can also use first-time events, updateable events, etc. based on your actual business scenarios.
220
+
221
+ #### 1.1 Regular Events
222
+
223
+ You can call `track` to upload events. We recommend setting event properties and sending conditions based on your previously documented requirements. Here is an example of a user purchasing a product:
224
+
225
+ ```
226
+ // Set event properties
227
+ Map<String,Object> properties = new HashMap<String,Object>();
228
+ properties.put("product_name","Product Name");// String
229
+ try {
230
+ te.track("account_id","distinct_id","product_buy",properties);
231
+ } catch (Exception e) {
232
+ System.out.println("except:"+e);
233
+ }
234
+ ```
235
+
236
+ #### 1.2 First-Time Events
237
+
238
+ First-time events are events that are recorded only once for a specific device or other dimensional ID. For example, in some scenarios, you may want to record an activation event on a specific device, which can be reported using a first-time event. To use the "first-time event verification" feature, you must set the `#first_check_id` field in properties, with type as string.
239
+
240
+ ```
241
+ // Report first-time event, event name is "device_activation", first_check_id value is "device_id"
242
+ Map<String, Object> properties = new HashMap<>();
243
+ properties.put("price",100);
244
+ properties.put("status",3);
245
+ properties.put("#first_check_id","device_id");
246
+ te.trackFirst("account_id", "distinct_id", "device_activation", properties);
247
+ ```
248
+
249
+ Note: Since first-time verification is completed on the server side, first-time events will be delayed by 1 hour before entering the database.
250
+
251
+ #### 1.3 Updateable Events
252
+
253
+ You can implement the need to modify event data in specific scenarios through updateable events. Updateable events need to specify an ID that identifies the event and pass it when creating the updateable event object. TE backend will determine the data to be updated based on the event name and event ID.
254
+
255
+ ```
256
+ // Report updateable event, event name is "UPDATABLE_EVENT"
257
+ // After reporting, event property status is 3, price is 100
258
+ Map<String, Object> properties = new HashMap<>();
259
+ properties.put("price",100);
260
+ properties.put("status",3);
261
+ te.trackUpdate("account_id","distinct_id","UPDATABLE_EVENT","test_event_id",properties);
262
+
263
+ // After reporting, the same event property status is updated to 5, price unchanged
264
+ Map<String, Object> protertiesNew = new HashMap<>();
265
+ protertiesNew.put("status",5);
266
+ te.trackUpdate("account_id", "distinct_id", "UPDATABLE_EVENT", "test_event_id", protertiesNew);
267
+ ```
268
+
269
+ #### 1.4 Overwriteable Events
270
+
271
+ Overwriteable events are similar to updateable events, except that overwriteable events will completely overwrite historical data with the latest data. Effectively, this is equivalent to deleting the previous data and inserting the latest data. TE backend will determine the data to be updated based on the event name and event ID.
272
+
273
+ ```
274
+ // Report overwriteable event, event name is "OVERWRITE_EVENT"
275
+ // After reporting, event property status is 3, price is 100
276
+ Map<String, Object> properties = new HashMap<>();
277
+ properties.put("price",100);
278
+ properties.put("status",3);
279
+ te.trackOverwrite("account_id","distinct_id", "OVERWRITE_EVENT","test_event_id", properties);
280
+
281
+ // After reporting, event property status is updated to 5, price property is deleted
282
+ Map<String, Object> protertiesNew = new HashMap<>();
283
+ protertiesNew.put("status",5);
284
+ te.trackOverwrite("account_id", "distinct_id", "OVERWRITE_EVENT", "test_event_id", protertiesNew);
285
+ ```
286
+
287
+ ### 2. User Properties
288
+
289
+ TE platform supports the following user property setting APIs: `userSet`, `userSetOnce`, `userAdd`, `userUnset`, `userDelete`, `userAppend`, `userUniqAppend`.
290
+
291
+ #### 2.1 userSet
292
+
293
+ For general user properties, you can call `userSet` to set them. Properties uploaded via this interface will overwrite existing property values. If the user property does not exist previously, a new user property will be created with the same type as the uploaded property. Here is an example of setting a username:
294
+
295
+ ```
296
+ // At this point, userName is "TA"
297
+ Map<String,Object> userProperties = new HashMap<String,Object>();
298
+ userProperties.put("user_name", "TA");
299
+ try {
300
+ te.userSet("account_id","distinct_id",userProperties);
301
+ } catch (Exception e) {
302
+ System.out.println("except:"+e);
303
+ }
304
+
305
+ // At this point, userName is "TE"
306
+ Map<String,Object> newUserProperties = new HashMap<String,Object>();
307
+ newUserProperties.put("user_name", "TE");
308
+ try {
309
+ te.userSet("account_id","distinct_id",newUserProperties);
310
+ } catch (Exception e) {
311
+ System.out.println("except:"+e);
312
+ }
313
+ ```
314
+
315
+ #### 2.2 userSetOnce
316
+
317
+ If you want to set a user property only once, you can call `userSetOnce`. When the property already has a value, this information will be ignored. Here is another example of setting a username:
318
+
319
+ ```
320
+ // first_payment_time is 2018-01-01 01:23:45.678
321
+ Map<String,Object> userProperties = new HashMap<String,Object>();
322
+ userProperties.put("first_payment_time","2018-01-01 01:23:45.678");
323
+ try {
324
+ te.userSetOnce("account_id","distinct_id",userProperties);
325
+ } catch (Exception e) {
326
+ System.out.println("except:"+e);
327
+ }
328
+
329
+ // first_payment_time is still 2018-01-01 01:23:45.678
330
+ Map<String,Object> newUserProperties = new HashMap<String,Object>();
331
+ newUserProperties.put("first_payment_time","2018-12-31 01:23:45.678");
332
+ try {
333
+ te.userSetOnce("account_id","distinct_id",newUserProperties);
334
+ } catch (Exception e) {
335
+ System.out.println("except:"+e);
336
+ }
337
+ ```
338
+
339
+ #### 2.3 userAdd
340
+
341
+ When you want to upload numeric properties, you can call `userAdd` to accumulate the property. If the property has not been set, it will be assigned 0 before calculation. Negative values can be passed, equivalent to subtraction. Here is an example of accumulating total payment amount:
342
+
343
+ ```
344
+ Map<String,Object> userProperties = new HashMap<String,Object>();
345
+ userProperties.put("total_revenue",30);
346
+ // Upload user property, at this point "total_revenue" value is 30
347
+ try {
348
+ te.userAdd("account_id","distinct_id",userProperties);
349
+ } catch (Exception e) {
350
+ System.out.println("except:"+e);
351
+ }
352
+
353
+ // Upload user property again, at this point "total_revenue" value accumulates to 678
354
+ Map<String,Object> newUserProperties = new HashMap<String,Object>();
355
+ newUserProperties.put("total_revenue",648);
356
+ try {
357
+ te.userAdd("account_id","distinct_id",newUserProperties);
358
+ } catch (Exception e) {
359
+ System.out.println("except:"+e);
360
+ }
361
+ ```
362
+
363
+ The property key must be a string, and Value only allows numeric values.
364
+
365
+ #### 2.4 userAppend
366
+
367
+ You can call `userAppend` to append array-type user properties.
368
+
369
+ ```
370
+ Map<String,Object> properties = new HashMap<String,Object>();
371
+ List<String> list = new ArrayList<>();
372
+ list.add("apple");
373
+ list.add("ball");
374
+ properties.put("user_list",list);
375
+ try{
376
+ // At this point, user_list property value is ["apple", "ball"]
377
+ te.userAppend("account_id", "distinct_id", properties);
378
+ } catch (Exception e) {
379
+ System.out.println("except:"+e);
380
+ }
381
+ ```
382
+
383
+ #### 2.5 userUniqAppend
384
+
385
+ You can call `userUniqAppend` to append array-type user properties. The `userUniqAppend` interface will deduplicate appended user properties, while `userAppend` interface does not deduplicate, allowing duplicate user properties.
386
+
387
+ ```
388
+ Map<String,Object> properties = new HashMap<String,Object>();
389
+ List<String> list = new ArrayList<>();
390
+ list.add("apple");
391
+ list.add("ball");
392
+ properties.put("user_list",list);
393
+
394
+ Map<String,Object> newProperties = new HashMap<String,Object>();
395
+ List<String> newList = new ArrayList<>();
396
+ newList.add("apple");
397
+ newList.add("cube");
398
+ newProperties.put("user_list", newList);
399
+ try{
400
+ // At this point, user_list property value is ["apple", "ball"]
401
+ te.userAppend("account_id", "distinct_id", properties);
402
+ // At this point, user_list property value is ["apple","apple","ball","cube"]
403
+ te.userAppend("account_id", "distinct_id",newProperties);
404
+ // At this point, user_list property value is ["apple", "ball","cube"]
405
+ te.userUniqAppend("account_id", "distinct_id",newProperties);
406
+ } catch (Exception e) {
407
+ System.out.println("except:"+e);
408
+ }
409
+ ```
410
+
411
+ #### 2.6 userUnset
412
+
413
+ When you want to clear user property values, you can call `userUnset` to clear specified properties. If the property has not been created in the cluster, `userUnset` will not create the property.
414
+
415
+ ```
416
+ // Reset multiple user properties
417
+ try {
418
+ te.userUnset("account_id", "distinct_id", "key1", "key2", "key3");
419
+ } catch (Exception e) {
420
+ System.out.println("except:"+e);
421
+ }
422
+ ```
423
+
424
+ user_unset: The parameter is the Key value of the property to be cleared.
425
+
426
+ #### 2.7 userDelete
427
+
428
+ If you want to delete a user, you can call `userDelete` to delete the user. You will no longer be able to query the user's properties, but events generated by the user can still be queried. This operation may have irreversible consequences, please use with caution.
429
+
430
+ ```
431
+ try{
432
+ te.userDelete("account_id","distinct_id");
433
+ } catch (Exception e) {
434
+ System.out.println("except:"+e);
435
+ }
436
+ ```
437
+
438
+ ### 3. Other Features
439
+
440
+ #### 3.1 TDBatchConsumer
441
+
442
+ ::: warning Note
443
+
444
+ When data volume is large or network is abnormal, there is a risk of data loss. Not recommended for production environments.
445
+
446
+ :::
447
+
448
+ Batch real-time data transmission to TE server without requiring transmission tools. When transmission fails due to network issues, it will retry 3 times. If still fails, data will be stored in cache buffer. Cache buffer size can be set, default 50, meaning maximum cached data count is 50\*20 (20 is batch value for each upload, configurable).
449
+
450
+ ```
451
+ TDAnalytics te = null;
452
+ try {
453
+ te = new TDAnalytics(new TDBatchConsumer("SERVER_URL", "APPID"));
454
+ } catch (Exception ignored){
455
+
456
+ }
457
+ ```
458
+
459
+ Parameter Description:
460
+
461
+ - `APPID`: Your project's APPID, can be obtained from TE backend project management page
462
+ - `SERVER_URL`: Data upload URL
463
+ - If you are connecting to cloud service, enter: https://global-receiver-ta.thinkingdata.cn
464
+ - If you use private deployment version, please bind domain for data collection address and configure HTTPS certificate: https://YOUR_DATA_COLLECTION_DOMAIN
465
+
466
+ #### 3.2 Scheduled Flush Feature
467
+
468
+ You can configure interval and autoFlush parameters in Config to enable scheduled data reporting.
469
+
470
+ ```
471
+ TDAnalytics te = null;
472
+
473
+ // e.g. TDLogConsumer
474
+ try {
475
+ TDLoggerConsumer.Config config = new TDLoggerConsumer.Config("./log");
476
+ // The cache event is reported every 10 seconds
477
+ config.setAutoFlush(true);
478
+ config.setInterval(10);
479
+ te = new TDAnalytics(new TDLoggerConsumer(config));
480
+ } catch (Exception ignored){}
481
+
482
+ // e.g. TDBatchConsumer
483
+ try {
484
+ TDBatchConsumer.Config config = new TDBatchConsumer.Config();
485
+ // The cache event is reported every 10 seconds
486
+ config.setAutoFlush(true);
487
+ config.setInterval(10);
488
+ te = new TDAnalytics(new TDBatchConsumer("url", "appId", config));
489
+ } catch (Exception ignored){}
490
+ ```
491
+
492
+ ---
493
+
494
+ # Real-time Debugging
495
+
496
+ ::: warning Note
497
+
498
+ SDK Debug mode is only for integration debugging. Do not use in production environment.
499
+
500
+ :::
501
+
502
+ During SDK integration, you can view SDK logs in IDE console or use TE's Debug feature for real-time debugging.
503
+
504
+ ### 1. Print SDK Logs
505
+
506
+ ```
507
+ TDAnalytics.enableLog(true);
508
+ ```
509
+
510
+ ### 2. Enable Debug Mode
511
+
512
+ Enabling Debug mode requires two steps:
513
+
514
+ 1. Use TDDebugConsumer
515
+ Here is sample code using TDDebugConsumer:
516
+
517
+ ```
518
+ /*
519
+ TDDebugConsumer: Data is reported one by one. When problems occur, users are notified via logs and exceptions. Not recommended for production environment.
520
+ */
521
+ TDAnalytics te = new TDAnalytics(new TDDebugConsumer("serverUrl","appId","deviceId"));
522
+ // Set event properties
523
+ Map<String,Object> properties = new HashMap<String,Object>();
524
+ properties.put("name", "shoes");
525
+ try {
526
+ te.track("account_id","distinct_id","payment",properties);
527
+ } catch (Exception e) {
528
+ System.out.println("except:"+e);
529
+ }
530
+ ```
531
+
532
+ 2. Add Debug Device in TE Backend
533
+ To prevent Debug mode from going live in production environment, only specified devices can enable Debug mode. Debug mode can only be enabled when Debug mode is turned on in the client and the device ID is configured in TE backend's "Tracking Management" page under "Debug Data" section.
534
+
535
+ Debug mode may affect data collection quality and App stability. Only use for integration stage data verification, not for online environment.
536
+
537
+ ---
538
+
539
+ # Preset Properties
540
+
541
+ The following preset properties are included in all events for Java SDK.
542
+
543
+ **Property Name** | **Chinese Name** | **Property Type** | **Description**
544
+
545
+ #ip | IP Address | Text | User's IP address, needs to be set manually. TE will use this to obtain user's geographic location information.
546
+
547
+ #country | Country | Text | User's country, generated based on IP address.
548
+
549
+ #country_code | Country Code | Text | User's country code (ISO 3166-1 alpha-2, i.e., two uppercase English letters), generated based on IP address.
550
+
551
+ #province | Province | Text | User's province, generated based on IP address.
552
+
553
+ #city | City | Text | User's city, generated based on IP address.
554
+
555
+ #lib | SDK Type | Text | Type of SDK you integrated, such as Java, etc.
556
+
557
+ #lib_version | SDK Version | Text | Version of SDK you integrated.