@thinkingai/ae-cli 6.1.30 → 6.1.33
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.
- package/README.md +16 -7
- package/README.zh.md +18 -7
- package/bin/ai-monitor.js +2 -0
- package/bin/runtime-capabilities.json +1 -1
- package/dist/ai-monitor-OHTSU6SV.js +33 -0
- package/dist/ai-monitor.js +136 -0
- package/dist/{auth-ADZHUIJR.js → auth-2MOK4OI6.js} +24 -14
- package/dist/{automation-FD2QZUP6.js → automation-6L6IAYRK.js} +6 -7
- package/dist/{capability-QXFRJYZD.js → capability-EMIHQJA3.js} +31 -34
- package/dist/{chunk-OAWPT7VP.js → chunk-2I5SZ5DS.js} +2 -2
- package/dist/{chunk-HRUOV6EQ.js → chunk-4IQYPWCX.js} +22 -21
- package/dist/{chunk-EUFP4M2A.js → chunk-7DHSB3FL.js} +85 -33
- package/dist/{chunk-4PSTYEG5.js → chunk-AMURHMS3.js} +11 -7
- package/dist/{chunk-KPQY44JQ.js → chunk-AWW2T2WL.js} +3 -0
- package/dist/chunk-BQFLABJQ.js +186 -0
- package/dist/{chunk-E25OSZLJ.js → chunk-COOMXFUG.js} +3 -3
- package/dist/{chunk-AVXDJAFC.js → chunk-DWAG2QJM.js} +52 -15
- package/dist/{chunk-CG773QXN.js → chunk-E3ONSFUN.js} +528 -299
- package/dist/chunk-EFGUBGA6.js +64 -0
- package/dist/chunk-EWVEAERM.js +563 -0
- package/dist/{chunk-VDICGXCY.js → chunk-HIMOBNEY.js} +2 -2
- package/dist/{chunk-JEUXDY3B.js → chunk-HQED4YB4.js} +1 -1
- package/dist/{chunk-2F64AZYH.js → chunk-KA5WKR5P.js} +2 -2
- package/dist/{chunk-TFORY6WY.js → chunk-KD5UC33N.js} +23 -9
- package/dist/{chunk-YVG6QD3V.js → chunk-LFJ7N36I.js} +103 -8
- package/dist/chunk-NNK3JBH4.js +60 -0
- package/dist/{chunk-YULUBP3R.js → chunk-O45NOIWR.js} +2 -2
- package/dist/{chunk-SOSFRU3O.js → chunk-PLNS5J33.js} +58 -26
- package/dist/chunk-PUSFEC6B.js +29 -0
- package/dist/{chunk-Z3Q2AEIN.js → chunk-R2SVAO4G.js} +14 -2
- package/dist/{chunk-Y3AM6LIO.js → chunk-RC3PPCYD.js} +16 -11
- package/dist/{chunk-AWVZTN2B.js → chunk-THTROEGD.js} +1 -1
- package/dist/{chunk-QVRIDN42.js → chunk-UCMO4LKL.js} +2 -2
- package/dist/{chunk-JSBLCLFE.js → chunk-VLOGOM7N.js} +13 -7
- package/dist/{chunk-72NJKS7O.js → chunk-XZDKAR4N.js} +4 -4
- package/dist/chunk-YE6MJB5V.js +1285 -0
- package/dist/{community-report-client-TJVCLZ3K.js → community-report-client-ULRNXLQV.js} +1 -1
- package/dist/{compat-check-HERBTQZN.js → compat-check-CADG7GND.js} +5 -4
- package/dist/{config-E3KANXMK.js → config-PFD3KWQG.js} +28 -14
- package/dist/{context-CDB5H5PD.js → context-SOQDFZIB.js} +8 -6
- package/dist/{data-integration-QE37EQ3A.js → data-integration-UNJ7EPW2.js} +6 -6
- package/dist/{evaluation-LR4YDYWL.js → evaluation-Q3AIGFOG.js} +14 -159
- package/dist/index.js +95 -593
- package/dist/{local-data-upload-client-KCMG6J62.js → local-data-upload-client-YTWMAAGE.js} +1 -1
- package/dist/{memory-SNFR5M23.js → memory-HKNGUIPK.js} +6 -7
- package/dist/{metadata-EXQYDZTH.js → metadata-GFWR5ZHC.js} +11 -10
- package/dist/{model-KEVCEXWD.js → model-NAKQWK4W.js} +4 -5
- package/dist/{personal-semantic-preference-ETY3KU2O.js → personal-semantic-preference-JCTKXLC3.js} +46 -15
- package/dist/{project-semantic-UHRMVOJF.js → project-semantic-B2NWQOKK.js} +19 -16
- package/dist/{sync-XKEBXESC.js → sync-UQH4J4BD.js} +9 -9
- package/dist/{te-agent-S6UQR4IE.js → te-agent-L6EYFQCC.js} +303 -17
- package/dist/{te-analysis-WOFFCIBC.js → te-analysis-U7NNOY66.js} +397 -203
- package/dist/{te-community-R7B6QYOO.js → te-community-3UQEW3KD.js} +14 -12
- package/dist/{te-dataops-KPILYVHA.js → te-dataops-SUNYXF5G.js} +13 -11
- package/dist/{te-engage-IAUM6ONX.js → te-engage-KMXZJ2KN.js} +10 -9
- package/dist/{te-experiment-TMLRA7B3.js → te-experiment-IEYKP6VC.js} +477 -45
- package/dist/{te-kb-GKWPSLSY.js → te-kb-MT3V5ZMH.js} +78 -18
- package/dist/{te-system-CYWSK3UN.js → te-system-F4ZU2HRQ.js} +6 -7
- package/dist/{te-team-ISN52YNG.js → te-team-M6E6XQ5H.js} +9 -8
- package/dist/{things-DDQ52Z3Q.js → things-FRLBZV2Z.js} +9 -8
- package/dist/{update-CTLNTX35.js → update-NULYHVE6.js} +8 -6
- package/dist/{workspace-2CKQX2XL.js → workspace-Z7L33OBQ.js} +6 -7
- package/package.json +13 -8
- package/skills/ae-agent/SKILL.md +19 -5
- package/skills/ae-agent/references/a2a.md +103 -0
- package/skills/ae-agent/references/command_index.md +11 -0
- package/skills/ae-ai-monitor/SKILL.md +179 -0
- package/skills/ae-ai-monitor/references/read-commands.md +866 -0
- package/skills/ae-analysis/SKILL.md +43 -25
- package/skills/ae-analysis/references/adhoc_export.md +3 -1
- package/skills/ae-analysis/references/ai_models/path.md +5 -6
- package/skills/ae-analysis/references/ai_models.md +1 -0
- package/skills/ae-analysis/references/analysis_data_retrieval.md +1 -1
- package/skills/ae-analysis/references/analysis_gateway_assets.md +2 -0
- package/skills/ae-analysis/references/asset_authentication_export.md +1 -1
- package/skills/ae-analysis/references/asset_authentication_update.md +6 -2
- package/skills/ae-analysis/references/asset_search.md +1 -1
- package/skills/ae-analysis/references/bad_case_begin.md +12 -0
- package/skills/ae-analysis/references/bad_case_get.md +12 -0
- package/skills/ae-analysis/references/bad_case_history.md +12 -0
- package/skills/ae-analysis/references/bad_case_list.md +12 -0
- package/skills/ae-analysis/references/bad_case_review.md +51 -0
- package/skills/ae-analysis/references/bad_case_run.md +12 -0
- package/skills/ae-analysis/references/bad_case_submit.md +12 -0
- package/skills/ae-analysis/references/bad_case_submit_to_page.md +12 -0
- package/skills/ae-analysis/references/bad_case_sync_evaluation.md +11 -0
- package/skills/ae-analysis/references/bi_panel_list.md +1 -1
- package/skills/ae-analysis/references/bi_panel_share.md +3 -1
- package/skills/ae-analysis/references/catalog_list.md +2 -0
- package/skills/ae-analysis/references/command_index.md +44 -35
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
- package/skills/ae-analysis/references/dashboard_handover.md +3 -1
- package/skills/ae-analysis/references/dashboard_list.md +3 -3
- package/skills/ae-analysis/references/dashboard_report_data_export.md +1 -1
- package/skills/ae-analysis/references/dashboard_share.md +3 -1
- package/skills/ae-analysis/references/dashboard_update.md +3 -2
- package/skills/ae-analysis/references/filter_value_list.md +2 -0
- package/skills/ae-analysis/references/folder_share.md +8 -2
- package/skills/ae-analysis/references/governance_recommendation_export.md +2 -2
- package/skills/ae-analysis/references/governance_recommendation_run_update.md +3 -1
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +9 -1
- package/skills/ae-analysis/references/personal_semantic_preference_delete.md +2 -0
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +2 -0
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +10 -2
- package/skills/ae-analysis/references/personal_semantic_preference_update.md +8 -0
- package/skills/ae-analysis/references/project_data_power_upsert.md +3 -1
- package/skills/ae-analysis/references/project_mark_time_create.md +2 -0
- package/skills/ae-analysis/references/project_mark_time_update.md +2 -0
- package/skills/ae-analysis/references/project_member_add.md +3 -1
- package/skills/ae-analysis/references/project_member_batch_update.md +3 -1
- package/skills/ae-analysis/references/project_member_handover_run.md +3 -1
- package/skills/ae-analysis/references/project_member_update.md +3 -1
- package/skills/ae-analysis/references/project_owner_update.md +8 -2
- package/skills/ae-analysis/references/project_role_upsert.md +5 -3
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +16 -1
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +14 -1
- package/skills/ae-analysis/references/project_space_share.md +8 -2
- package/skills/ae-analysis/references/property_get.md +2 -0
- package/skills/ae-analysis/references/public_link_list.md +3 -1
- package/skills/ae-analysis/references/query_cancel.md +4 -1
- package/skills/ae-analysis/references/report_data_run.md +1 -1
- package/skills/ae-analysis/references/report_list.md +3 -3
- package/skills/ae-analysis/references/scenario_append.md +2 -2
- package/skills/ae-analysis/references/scenario_collect.md +15 -4
- package/skills/ae-analysis/references/scenario_evaluation.md +17 -1
- package/skills/ae-analysis/references/scenario_list.md +7 -7
- package/skills/ae-analysis/references/system_oauth2_update.md +3 -1
- package/skills/ae-analysis/references/system_third_party_login_upsert.md +4 -2
- package/skills/ae-analysis/references/user_tag_create.md +4 -1
- package/skills/ae-analysis/references/user_tag_get.md +2 -0
- package/skills/ae-analysis/references/user_tag_models.md +8 -2
- package/skills/ae-analysis/references/user_tag_update.md +5 -2
- package/skills/ae-analysis/references/virtual_property_create.md +12 -1
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +10 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +55 -13
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +2 -2
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +2 -2
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +7 -1
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/wait-compile-run.mjs +79 -0
- package/skills/ae-automation/SKILL.md +4 -2
- package/skills/ae-capability/SKILL.md +16 -8
- package/skills/ae-community/SKILL.md +1 -0
- package/skills/ae-dataops/SKILL.md +1 -0
- package/skills/ae-engage/SKILL.md +1 -0
- package/skills/ae-evaluation/SKILL.md +17 -2
- package/skills/ae-experiment/SKILL.md +69 -13
- package/skills/ae-experiment/references/experiment_approval.md +229 -0
- package/skills/ae-experiment/references/manage_experiment.md +15 -2
- package/skills/ae-experiment/references/manage_traffic_domains.md +131 -0
- package/skills/ae-experiment/references/query_experiment_detail.md +8 -0
- package/skills/ae-experiment/references/query_experiment_list.md +6 -0
- package/skills/ae-experiment/references/save_experiment.md +56 -10
- package/skills/ae-experiment/references/save_metric.md +29 -2
- package/skills/ae-experiment/references/save_submit_experiment.md +22 -3
- package/skills/ae-experiment/references/save_submit_external_experiment.md +59 -3
- package/skills/ae-experiment/references/save_traffic_layer.md +17 -1
- package/skills/ae-generate-tracking-plan/SKILL.md +5 -0
- package/skills/ae-kb/SKILL.md +8 -4
- package/skills/ae-kb/references/analysis-workflow.md +11 -2
- package/skills/ae-kb/references/publication.md +45 -0
- package/skills/ae-kb/references/query-workflow.md +3 -1
- package/skills/ae-kb/references/versions.md +1 -1
- package/skills/ae-metadata/SKILL.md +1 -0
- package/skills/ae-migrate-tracking-code/SKILL.md +2 -1
- package/skills/ae-team/SKILL.md +1 -1
- package/skills/ae-tracking-matrix/SKILL.md +170 -0
- package/skills/ae-tracking-matrix/assets//345/237/213/347/202/271/346/250/241/347/211/210.xlsx +0 -0
- package/skills/ae-tracking-matrix/i18n.yaml +12 -0
- package/skills/ae-tracking-matrix/references/ae-capabilities.md +93 -0
- package/skills/ae-tracking-matrix/references/business-semantic-checks.md +30 -0
- package/skills/ae-tracking-matrix/references/categories/acquaintance_social_tracking_plan_template.md +256 -0
- package/skills/ae-tracking-matrix/references/categories/blockchain_game_tracking_plan_template.md +213 -0
- package/skills/ae-tracking-matrix/references/categories/card_game_tracking_plan_template.md +407 -0
- package/skills/ae-tracking-matrix/references/categories/casual_game_tracking_plan_template.md +218 -0
- package/skills/ae-tracking-matrix/references/categories/casual_music.md +112 -0
- package/skills/ae-tracking-matrix/references/categories/chess_cards_tracking_plan_template.md +301 -0
- package/skills/ae-tracking-matrix/references/categories/ecommerce_tracking_plan_template.md +356 -0
- package/skills/ae-tracking-matrix/references/categories/fishing.md +775 -0
- package/skills/ae-tracking-matrix/references/categories/game_basic_module_tracking_plan.md +89 -0
- package/skills/ae-tracking-matrix/references/categories/idle_card.md +27 -0
- package/skills/ae-tracking-matrix/references/categories/idle_game_tracking_plan_template.md +415 -0
- package/skills/ae-tracking-matrix/references/categories/interactive_video.md +133 -0
- package/skills/ae-tracking-matrix/references/categories/merge.md +639 -0
- package/skills/ae-tracking-matrix/references/categories/mmo_mobile_tracking_plan_template.md +406 -0
- package/skills/ae-tracking-matrix/references/categories/mmo_web.md +230 -0
- package/skills/ae-tracking-matrix/references/categories/music.md +137 -0
- package/skills/ae-tracking-matrix/references/categories/online_education_tracking_plan_template.md +414 -0
- package/skills/ae-tracking-matrix/references/categories/qipai_mj.md +199 -0
- package/skills/ae-tracking-matrix/references/categories/reading_tracking_plan_template.md +158 -0
- package/skills/ae-tracking-matrix/references/categories/roguelike_tracking_plan_template.md +546 -0
- package/skills/ae-tracking-matrix/references/categories/rpg.md +195 -0
- package/skills/ae-tracking-matrix/references/categories/short_drama_tracking_plan_template.md +115 -0
- package/skills/ae-tracking-matrix/references/categories/simulation_business_tracking_plan_template.md +151 -0
- package/skills/ae-tracking-matrix/references/categories/slg_tracking_plan_template.md +260 -0
- package/skills/ae-tracking-matrix/references/categories/slots_tracking_plan_template.md +232 -0
- package/skills/ae-tracking-matrix/references/categories/stranger_social_tracking_plan_template.md +359 -0
- package/skills/ae-tracking-matrix/references/categories/tower_defense.md +365 -0
- package/skills/ae-tracking-matrix/references/categories/video_editor_tracking_plan_template.md +211 -0
- package/skills/ae-tracking-matrix/references/categories/wechat_minigame.md +132 -0
- package/skills/ae-tracking-matrix/references/category-registry.md +77 -0
- package/skills/ae-tracking-matrix/references/data-verification/diagnosis_kb.md +230 -0
- package/skills/ae-tracking-matrix/references/data-verification/sql_checks.md +406 -0
- package/skills/ae-tracking-matrix/references/data-verification/tracking_plan_comparison.md +128 -0
- package/skills/ae-tracking-matrix/references/eval-cases.md +74 -0
- package/skills/ae-tracking-matrix/references/naming-dict.md +238 -0
- package/skills/ae-tracking-matrix/references/optimization-checklist.md +85 -0
- package/skills/ae-tracking-matrix/references/plan-generation/export-schema.md +142 -0
- package/skills/ae-tracking-matrix/references/plan-generation/module-baseline.md +47 -0
- package/skills/ae-tracking-matrix/references/plan-generation/reference.md +794 -0
- package/skills/ae-tracking-matrix/references/plan-generation/template-catalog.md +94 -0
- package/skills/ae-tracking-matrix/references/scene-routing.md +80 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/android.md +3787 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/c.md +827 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-lua.md +655 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-x.md +953 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocoscreator.md +1128 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/corona.md +714 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/egret.md +1268 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/flutter.md +776 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/h5-and-app-sdk-integration.md +182 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/ios.md +2755 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/javascript.md +1182 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/layaair.md +1300 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/macos.md +1369 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/mini-program-mini-game.md +1692 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/openharmony.md +902 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/react-native.md +763 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/uni-app.md +1107 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/unity.md +1532 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/unreal.md +845 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/android_sdk_faq.md +228 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/ios_sdk_faq.md +149 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/java_sdk_faq.md +407 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/javascript_sdk_faq.md +163 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/minigame_sdk_faq.md +149 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/miniprogram_sdk_faq.md +153 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/python_sdk_faq.md +232 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/sdk_log_guide.md +314 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/sdk_usage_notes.md +117 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/unity_sdk_faq.md +148 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/filebeat-logstash-guide.md +645 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_guide.md +307 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_parser_plugin.md +347 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/restful_api_notes.md +72 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/ta-datax-writer-guide.md +264 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/c.md +566 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/erlang.md +409 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/golang.md +446 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/java.md +557 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/lua.md +457 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/nodejs.md +490 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/php.md +523 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/python.md +484 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/ruby.md +442 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/data-rules.md +391 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/first-event-validation.md +91 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/preset-properties-system-fields.md +635 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/updatable-events.md +113 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/user-identification-rules.md +466 -0
- package/skills/ae-tracking-matrix/references/standard-base/README.md +22 -0
- package/skills/ae-tracking-matrix/references/standard-base/basic_event_data.md +174 -0
- package/skills/ae-tracking-matrix/references/standard-base/common_event_properties.md +20 -0
- package/skills/ae-tracking-matrix/references/standard-base/common_event_properties_setup.md +7 -0
- package/skills/ae-tracking-matrix/references/standard-base/data_type_design_principles.md +14 -0
- package/skills/ae-tracking-matrix/references/standard-base/gameplay_event_data.md +370 -0
- package/skills/ae-tracking-matrix/references/standard-base/id_system_faq.md +47 -0
- package/skills/ae-tracking-matrix/references/standard-base/integration_must_know.md +37 -0
- package/skills/ae-tracking-matrix/references/standard-base/multi_platform_integration_notes.md +27 -0
- package/skills/ae-tracking-matrix/references/standard-base/multi_user_id_system_recommendations.md +23 -0
- package/skills/ae-tracking-matrix/references/standard-base/tracking_notes.md +14 -0
- package/skills/ae-tracking-matrix/references/standard-base/user_data.md +46 -0
- package/skills/ae-tracking-matrix/references/standard-base/user_id_system.md +13 -0
- package/skills/ae-tracking-matrix/references/system-fields.md +297 -0
- package/skills/ae-tracking-matrix/references/te-field-translations.md +1791 -0
- package/skills/ae-tracking-matrix/references/workflows/data-verification.md +232 -0
- package/skills/ae-tracking-matrix/references/workflows/feasibility-analysis.md +829 -0
- package/skills/ae-tracking-matrix/references/workflows/integration-qna.md +355 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-generation.md +283 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-lint.md +168 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-review-optimize.md +205 -0
- package/skills/ae-tracking-matrix/references/workflows/prd-to-suggestions.md +75 -0
- package/skills/ae-tracking-matrix/references/workflows/troubleshooting.md +36 -0
- package/skills/ae-tracking-matrix/references/workflows/validated-upload.md +107 -0
- package/skills/ae-tracking-matrix/scripts/build_template_catalog.py +114 -0
- package/skills/ae-tracking-matrix/scripts/export_tracking_plan.py +53 -0
- package/skills/ae-tracking-matrix/scripts/finalize_plan.py +166 -0
- package/skills/ae-tracking-matrix/scripts/lint_tracking_plan.py +674 -0
- package/skills/ae-tracking-matrix/scripts/plan_contract.py +200 -0
- package/skills/ae-tracking-matrix/scripts/plan_types.py +60 -0
- package/skills/ae-tracking-matrix/scripts/prepare_delivery.py +169 -0
- package/skills/ae-tracking-matrix/scripts/sync_plan.py +296 -0
- package/skills/ae-tracking-matrix/scripts/upload_plan.py +340 -0
- package/dist/chunk-AMBFK2K3.js +0 -28
- package/dist/chunk-Y74WTIKJ.js +0 -10
|
@@ -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.
|