@thinkingai/ae-cli 6.1.30 → 6.1.32
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 +11 -5
- package/README.zh.md +11 -5
- package/bin/ai-monitor.js +2 -0
- package/dist/ai-monitor-MKMHSSNI.js +32 -0
- package/dist/ai-monitor.js +135 -0
- package/dist/{auth-ADZHUIJR.js → auth-CZHHPZOQ.js} +10 -9
- package/dist/{automation-FD2QZUP6.js → automation-FLCPFMN4.js} +4 -4
- package/dist/{capability-QXFRJYZD.js → capability-64KVJFIA.js} +27 -31
- package/dist/{chunk-YULUBP3R.js → chunk-3ULDJJTZ.js} +1 -1
- package/dist/{chunk-HRUOV6EQ.js → chunk-4XKTRCRK.js} +15 -15
- package/dist/{chunk-JSBLCLFE.js → chunk-5M5LBRR3.js} +1 -1
- package/dist/chunk-6M7ZEDT2.js +182 -0
- package/dist/{chunk-KPQY44JQ.js → chunk-AWW2T2WL.js} +3 -0
- package/dist/chunk-BNBCMCYN.js +563 -0
- package/dist/chunk-CF6JTT2U.js +64 -0
- package/dist/{chunk-CG773QXN.js → chunk-DWBYNGSR.js} +564 -314
- package/dist/{chunk-VDICGXCY.js → chunk-F2VFZUGG.js} +2 -2
- package/dist/{chunk-TFORY6WY.js → chunk-FCAA7I2D.js} +2 -2
- package/dist/{chunk-SOSFRU3O.js → chunk-HTZ2MLYA.js} +47 -21
- package/dist/{chunk-AWVZTN2B.js → chunk-HVMCPKOZ.js} +1 -1
- package/dist/chunk-IDDWEZ7F.js +1285 -0
- package/dist/{chunk-E25OSZLJ.js → chunk-KTJXD27G.js} +2 -2
- package/dist/{chunk-AVXDJAFC.js → chunk-NLEXY2TM.js} +47 -12
- package/dist/{chunk-YVG6QD3V.js → chunk-P7QDCWJ6.js} +98 -7
- package/dist/{chunk-EUFP4M2A.js → chunk-T7WF4HYW.js} +84 -32
- package/dist/{chunk-Y3AM6LIO.js → chunk-TMQGS4TO.js} +15 -10
- package/dist/{compat-check-HERBTQZN.js → compat-check-ZJNCMNQV.js} +2 -2
- package/dist/{config-E3KANXMK.js → config-FSH2NMNZ.js} +25 -12
- package/dist/{context-CDB5H5PD.js → context-YAQG6YQC.js} +2 -2
- package/dist/{evaluation-LR4YDYWL.js → evaluation-2JSF4V47.js} +13 -158
- package/dist/index.js +81 -583
- package/dist/{memory-SNFR5M23.js → memory-VEZZVAAP.js} +4 -4
- package/dist/{metadata-EXQYDZTH.js → metadata-3IWHX3V4.js} +7 -7
- package/dist/{model-KEVCEXWD.js → model-T7H7Q6BG.js} +2 -2
- package/dist/{personal-semantic-preference-ETY3KU2O.js → personal-semantic-preference-YITU23SA.js} +6 -6
- package/dist/{project-semantic-UHRMVOJF.js → project-semantic-MHEXJF3C.js} +15 -13
- package/dist/{sync-XKEBXESC.js → sync-AQHVCSPI.js} +4 -4
- package/dist/{te-agent-S6UQR4IE.js → te-agent-RXI7WOH4.js} +5 -5
- package/dist/{te-analysis-WOFFCIBC.js → te-analysis-CZY74HVF.js} +380 -191
- package/dist/{te-community-R7B6QYOO.js → te-community-DKCYUBCM.js} +6 -6
- package/dist/{te-dataops-KPILYVHA.js → te-dataops-QEH6VE56.js} +3 -3
- package/dist/{te-engage-IAUM6ONX.js → te-engage-WK7WKDKF.js} +6 -6
- package/dist/{te-experiment-TMLRA7B3.js → te-experiment-LH3RPIOE.js} +274 -29
- package/dist/{te-kb-GKWPSLSY.js → te-kb-UPORIOVN.js} +16 -7
- package/dist/{te-system-CYWSK3UN.js → te-system-AL4B4XZL.js} +2 -2
- package/dist/{te-team-ISN52YNG.js → te-team-LLVTO2G4.js} +5 -5
- package/dist/{things-DDQ52Z3Q.js → things-XLMLBYQR.js} +5 -5
- package/dist/{update-CTLNTX35.js → update-7J5UQHSK.js} +3 -3
- package/dist/{workspace-2CKQX2XL.js → workspace-FF2HXJGR.js} +4 -4
- package/package.json +9 -7
- 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 +10 -4
- 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_gateway_assets.md +2 -0
- 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 +38 -29
- 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_run_update.md +3 -1
- 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 +3 -1
- 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_list.md +2 -1
- 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 +9 -5
- 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 +38 -11
- package/skills/ae-experiment/references/experiment_approval.md +171 -0
- package/skills/ae-experiment/references/manage_experiment.md +11 -2
- package/skills/ae-experiment/references/save_experiment.md +28 -8
- package/skills/ae-experiment/references/save_submit_experiment.md +18 -3
- package/skills/ae-experiment/references/save_submit_external_experiment.md +57 -3
- package/skills/ae-generate-tracking-plan/SKILL.md +5 -0
- package/skills/ae-kb/SKILL.md +5 -3
- package/skills/ae-kb/references/analysis-workflow.md +11 -2
- 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
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# Viewing Client SDK Logs
|
|
2
|
+
|
|
3
|
+
# I. Background
|
|
4
|
+
|
|
5
|
+
During client SDK integration debugging and troubleshooting, you can use logs to analyze whether data collection and upload meet expectations. This document introduces how to enable SDK logs, and keywords in logs and their meanings.
|
|
6
|
+
|
|
7
|
+
### Native Client SDK Upload Mechanism
|
|
8
|
+
|
|
9
|
+
First we briefly introduce native client SDK upload mechanism. Both Android and iOS SDK cache data in local database and batch upload. Local caching data is to avoid data loss under network abnormality, batch upload is to avoid system and network overhead from frequent uploading. Data upload triggers when any of the following conditions is met:
|
|
10
|
+
|
|
11
|
+
- APP switches to background
|
|
12
|
+
- Time interval from last data upload reaches upload time interval (default interval is 30 seconds, can be modified in TE)
|
|
13
|
+
- Local cache count reaches upload count (default triggers upload when reaching 30 records, can be modified in TE)
|
|
14
|
+
|
|
15
|
+
Therefore, during debugging, if conditions triggering data upload are not met, data is still cached locally.
|
|
16
|
+
|
|
17
|
+
### Data Log Printing
|
|
18
|
+
|
|
19
|
+
For one record, log is printed when data is stored locally, and another log is printed when data is uploaded, therefore need to distinguish log meaning by keywords in log, don't mistakenly think duplicate data was generated.
|
|
20
|
+
|
|
21
|
+
# II. Enable Log Printing
|
|
22
|
+
|
|
23
|
+
### iOS Version Before 3.0
|
|
24
|
+
|
|
25
|
+
Log filter field "[THINKING]"
|
|
26
|
+
|
|
27
|
+
**Enable Log Printing**
|
|
28
|
+
|
|
29
|
+
```objectivec
|
|
30
|
+
[ThinkingAnalyticsSDK setLogLevel:TDLoggingLevelDebug];
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Initialize SDK**
|
|
34
|
+
|
|
35
|
+
mode: indicates SDK used mode
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
2024-02-01 11:36:47.862929+0800 TATest_iOS[32287:14658471] [THINKING] Thinking Analytics iOS SDK 2.8.4 instance initialized successfully with mode: NORMAL, APP ID: af6861d085e14b5c948662e1fcdce6ef, server url: https://receiver-ta-demo.thinkingdata.cn, device ID: 15F96974-CE32-44F5-9AD0-F259349FDAF2
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Data Stored Locally** (keyword: `[THINKING] queueing data`)
|
|
42
|
+
|
|
43
|
+
```objectivec
|
|
44
|
+
2022-10-25 17:30:29.270504+0800 TATest_iOS[85710:698131] [THINKING] queueing data:{
|
|
45
|
+
"properties" : {
|
|
46
|
+
"#os" : "iOS",
|
|
47
|
+
"#device_model" : "arm64",
|
|
48
|
+
...
|
|
49
|
+
},
|
|
50
|
+
"#type" : "track",
|
|
51
|
+
"#uuid" : "DB2B97A5-183A-439E-B8B2-FE9AF77D7421",
|
|
52
|
+
"#distinct_id" : "E5ABB02F-EA10-47AC-AB6C-A8E47E55B4E9",
|
|
53
|
+
"#event_name" : "testA",
|
|
54
|
+
"#time" : "2022-10-25 14:30:29.256"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Data Upload to TA** (keyword: `[THINKING] flush success sendContent`)
|
|
59
|
+
|
|
60
|
+
```objectivec
|
|
61
|
+
2022-10-25 17:30:32.551796+0800 TATest_iOS[85710:698131] [THINKING] flush success sendContent---->:{
|
|
62
|
+
"#app_id" : "af6861d085e14b5c948662e1fcdce6ef",
|
|
63
|
+
"data" : [...],
|
|
64
|
+
"#flush_time" : 1666690232351
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Upload to TA Result** (keyword: `flush success responseData`)
|
|
69
|
+
|
|
70
|
+
code 0 means upload success
|
|
71
|
+
|
|
72
|
+
```objectivec
|
|
73
|
+
2022-10-25 17:30:32.552237+0800 TATest_iOS[85710:698131] [THINKING] flush success responseData---->{
|
|
74
|
+
"code" : 0
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### iOS Version 3.0 and After
|
|
79
|
+
|
|
80
|
+
Log filter field "[ThinkingData]"
|
|
81
|
+
|
|
82
|
+
**Enable Log Printing**
|
|
83
|
+
|
|
84
|
+
```objectivec
|
|
85
|
+
[TDAnalytics enableLog:YES];
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Initialize SDK**
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
2024-02-01 12:07:05.077926+0800 TATest_iOS[32411:14665745] [ThinkingData] [ThinkingData][Info] initialized successfully!
|
|
92
|
+
AppID: af6861d085e14b5c948662e1fcdce6ef
|
|
93
|
+
ServerUrl: https://receiver-ta-demo.thinkingdata.cn
|
|
94
|
+
Mode: Debug
|
|
95
|
+
TimeZone: Local Time Zone (Asia/Shanghai (GMT+8) offset 28800)
|
|
96
|
+
DeviceID: 15F96974-CE32-44F5-9AD0-F259349FDAF2
|
|
97
|
+
Lib: iOS
|
|
98
|
+
LibVersion: 3.0.0
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Data Stored Locally** (keyword: `[ThinkingData] [Info] Enqueue data`)
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
2023-09-05 14:27:44.721461+0800 TestTAiOS[41411:3781875] [ThinkingData] [Info] Enqueue data: {
|
|
105
|
+
"properties" : {...},
|
|
106
|
+
"#type" : "track",
|
|
107
|
+
"#uuid" : "0ECCD33B-8076-42A5-BA2B-89DE0773B84B",
|
|
108
|
+
"#distinct_id" : "51C6265F-8F03-461E-91D3-D0FFB11DFCFD_2",
|
|
109
|
+
"#event_name" : "iOS_001",
|
|
110
|
+
"#time" : "2023-09-05 14:27:44.719"
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Data Upload to TA** (keyword: `[ThinkingData] [Debug] flush success sendContent`)
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
2023-09-05 14:28:14.834448+0800 TestTAiOS[41411:3782015] [ThinkingData] [Debug] flush success sendContent---->:{...}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Upload to TA Result**
|
|
121
|
+
|
|
122
|
+
- code 0 means upload success
|
|
123
|
+
- If flush success responseData is printed, can consider upload successful. Only look at response status code 200, not return content code
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
2023-09-05 14:28:14.835774+0800 TestTAiOS[41411:3782015] [ThinkingData] [Debug] flush success responseData---->{
|
|
127
|
+
"code" : 0
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Android Version Before 3.0
|
|
132
|
+
|
|
133
|
+
Log filter field "ThinkingAnalytics"
|
|
134
|
+
|
|
135
|
+
**Enable Log Printing**
|
|
136
|
+
|
|
137
|
+
```java
|
|
138
|
+
ThinkingAnalyticsSDK.enableTrackLog(true);
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Initialize SDK**
|
|
142
|
+
|
|
143
|
+
mode: indicates SDK used mode
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
2024-04-09 13:39:23.458 12219-12219 ThinkingAnalyticsSDK cn.thinkingdata.android.demo I Thinking Analytics SDK 2.8.3 instance initialized successfully with mode: NORMAL, APP ID ends with: 3356, server url: https://receiver.ta.thinkingdata.cn/sync, device ID: d4d6419233102942
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Data Stored Locally** (keyword: `Data enqueued`)
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
2022-10-26 10:56:54.416 6445-6528/cn.thinkingdata.android.demo I/ThinkingAnalytics.DataHandle: Data enqueued(e6ef):
|
|
153
|
+
{
|
|
154
|
+
"#type": "track",
|
|
155
|
+
"#time": "2022-10-26 10:56:54.285",
|
|
156
|
+
"#distinct_id": "04af1a3d-56b2-4c8f-a54a-2b6f655b8286",
|
|
157
|
+
"#event_name": "testA",
|
|
158
|
+
...
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**Data Upload to TA and Result** (keyword: `upload message`)
|
|
163
|
+
|
|
164
|
+
code 0 means upload success
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
2022-10-26 10:56:54.637 6445-6526/cn.thinkingdata.android.demo I/ThinkingAnalytics.DataHandle: ret code: 0, upload message: {...}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Android Version After 3.0
|
|
171
|
+
|
|
172
|
+
Log filter field "[ThinkingData]"
|
|
173
|
+
|
|
174
|
+
**Enable Log Printing**
|
|
175
|
+
|
|
176
|
+
```java
|
|
177
|
+
TDAnalytics.enableLog(true);
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Initialize SDK**
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
2024-04-09 13:48:02.088 13974-13974 ThinkingAnalyticsSDK cn.thinkingdata.android.demo I [ThinkingData] Info: ThinkingData SDK 3.0.2 initialize success with mode: NORMAL, APP ID ends with: 3df0, server url: https://receiver-ta-preview.thinkingdata.cn/sync
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Data Stored Locally** (keyword: `[ThinkingData] Info: Enqueue data`)
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
2023-09-14 10:09:52.461 15126-15163/com.example.tatest_android I/ThinkingAnalytics.DataHandle: [ThinkingData] Info: Enqueue data(e6ef):
|
|
190
|
+
{
|
|
191
|
+
"#type": "track",
|
|
192
|
+
"#time": "2023-09-14 10:09:52.445",
|
|
193
|
+
"#distinct_id": "b86de4eb-12b8-4ce4-924a-54cd12b5fa25",
|
|
194
|
+
"#event_name": "android_001",
|
|
195
|
+
...
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**Data Upload to TA** (keyword: `[ThinkingData] Debug: Send event, Request =`)
|
|
200
|
+
|
|
201
|
+
```
|
|
202
|
+
2023-09-14 10:09:52.688 15126-15162/com.example.tatest_android D/ThinkingAnalytics.DataHandle: [ThinkingData] Debug: Send event, Request = {...}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Upload to TA Result** (keyword: `[ThinkingData] Debug: Send event, Response =`)
|
|
206
|
+
|
|
207
|
+
code 0 means upload success
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
2023-09-14 10:09:52.688 15126-15162/com.example.tatest_android D/ThinkingAnalytics.DataHandle: [ThinkingData] Debug: Send event, Response ={
|
|
211
|
+
"code": 0
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Unity Version Before 3.0
|
|
216
|
+
|
|
217
|
+
**Enable Log Printing**
|
|
218
|
+
|
|
219
|
+
Note: EnableLog needs to be called after StartThinkingAnalytics
|
|
220
|
+
|
|
221
|
+
```csharp
|
|
222
|
+
ThinkingAnalyticsAPI.EnableLog(true);
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Data Stored Locally** (keyword: `Save event`)
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
[ThinkingEngine] (Unity_V2.6.0-beta.1) Save event: {...}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Data Upload to TA** (keyword: `Post event`)
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
[ThinkingEngine] (Unity_V2.6.0-beta.1) Post event: {...}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**Upload to TA Result**
|
|
238
|
+
|
|
239
|
+
code 0 means upload success
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
[ThinkingEngine] (Unity_V2.6.0-beta.1) Response: {"code":0}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Unity Version After 3.0
|
|
246
|
+
|
|
247
|
+
**Enable Log Printing**
|
|
248
|
+
|
|
249
|
+
Note: EnableLog needs to be called after Init. Unity log is enabled by default.
|
|
250
|
+
|
|
251
|
+
```csharp
|
|
252
|
+
TDAnalytics.EnableLog(true);
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Data Stored Locally** (keyword: `Enqueue data`)
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
[ThinkingData] Info: Enqueue data: {...}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**Data Upload to TA** (keyword: `Send event Request`)
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
[ThinkingData] Info: Send event Request: {...}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Upload to TA Result** (keyword: `Send event Response`)
|
|
268
|
+
|
|
269
|
+
- Normal mode, code 0 means upload success
|
|
270
|
+
- Debug mode, if no whitelist added, "errorLevel":-1, prompts to add whitelist
|
|
271
|
+
- Debug mode, if whitelist added, "errorLevel":0, means upload success
|
|
272
|
+
|
|
273
|
+
### OpenHarmony
|
|
274
|
+
|
|
275
|
+
Log filter field "[ThinkingData]", but due to print field limit, usually no filter condition added
|
|
276
|
+
|
|
277
|
+
**Enable Log Printing**
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
TDAnalytics.enableLog(true);
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Initialize SDK**
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
[ThinkingData] Info: ThinkingData SDK 1.3.3 initialize success with mode: NORMAL, APP ID ends with: e6ef, server url: https://receiver-ta-demo.thinkingdata.cn, device ID: ad6a69cf-3f2c-47ed-a6e9-4808e36cc61f
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Data Stored Locally** (keyword: `[ThinkingData] Info: Enqueue data`)
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
[ThinkingData] Info: Enqueue data : {...}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Data Upload to TA** (keyword: `[ThinkingData] Info: Send event`)
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
[ThinkingData] Info: Send event, Request = {...}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Upload to TA Result** (keyword: `[ThinkingData] Info: Response`)
|
|
302
|
+
|
|
303
|
+
If Response is printed, can consider upload successful. Only look at response status code 200, not return content code
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
[ThinkingData] Info: Response :{"responseCode":200,...}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
# III. Query Data in TE System
|
|
310
|
+
|
|
311
|
+
Use SQL to query data via #device_id, here data is most timely, real-time data is also less timely than here
|
|
312
|
+
|
|
313
|
+
1. Select SQL query in Analysis
|
|
314
|
+
2. Parse event table, add #device_id in where clause
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# SDK Usage Notes
|
|
2
|
+
|
|
3
|
+
# I. Client SDK
|
|
4
|
+
|
|
5
|
+
1. **Upload Mode**
|
|
6
|
+
|
|
7
|
+
- Use `Normal` mode in production environment;
|
|
8
|
+
- `Debug` and `Debug_Only` modes are only for testing phase debugging, do not use in production environment and formal phase;
|
|
9
|
+
|
|
10
|
+
2. **Cache Upload Strategy**
|
|
11
|
+
|
|
12
|
+
- Android, iOS native SDK and game engine SDK and cross-platform SDK that call Android, iOS SDK at the underlying layer, default adopt data cache and batch upload strategy, upload timing defaults to 30 records/30 seconds, i.e. device local cache reaches 30 records or every 30 seconds triggers data upload. Can adjust upload frequency in TE Web "Project Management" page, but if upload too frequently (e.g. 1 record/1 second) will cause client system CPU, memory, network etc. overhead increase, causing device overheating, lagging etc. issues.
|
|
13
|
+
- JS, Mini Game/Mini Program SDK default don't enable local cache, data will directly upload, also can enable local cache and batch upload function in SDK settings;
|
|
14
|
+
- For native SDK, in Normal mode, calling `track()` method won't immediately trigger data upload, will upload according to cache upload strategy; if want data immediately uploaded, can call `flush()` method to trigger.
|
|
15
|
+
|
|
16
|
+
3. **Upload Failure Handling**
|
|
17
|
+
|
|
18
|
+
- For enabled local cache situation, failed upload data will be saved locally and re-uploaded when next upload condition triggers;
|
|
19
|
+
- If local cache not enabled, can customize handling for upload failure via callback, avoid data loss;
|
|
20
|
+
|
|
21
|
+
4. **Property Type**
|
|
22
|
+
|
|
23
|
+
- For TE preset properties (e.g. `#account_id`, `#time`, `#ip` etc.), property type is TE system fixed setting, preset property list see Preset Properties and System Fields.
|
|
24
|
+
- For custom properties (properties other than TE preset properties), property type is TE system auto-recognized based on property value, first record carrying that property's property value determines property type;
|
|
25
|
+
- If uploaded data property value doesn't match TE system property type, system will attempt forced conversion, if conversion succeeds property will be stored, if conversion fails **that property will be discarded**;
|
|
26
|
+
- Recommended to pay attention to exception storage in upload management, timely identify abnormal data and fix; if have high requirement for data quality, can also upload tracking plan, and refer to project data processing rules setting data processing rules, ensure property type matches expectation;
|
|
27
|
+
- Metadata management tool supports modifying property type, note, **after type modification property value will be cleared to NULL**.
|
|
28
|
+
|
|
29
|
+
5. **Time Calibration**
|
|
30
|
+
|
|
31
|
+
- Recommended to enable time calibration function, avoid data time deviation due to device system time inaccurate, affecting subsequent analysis;
|
|
32
|
+
- Client upload, TE receives data within 10 days before to 3 days after time range, data exceeding time range **will be discarded**;
|
|
33
|
+
- Only need to do time calibration once after SDK initialization, don't need multiple calibrations;
|
|
34
|
+
- Time calibration method recommended prioritizing use of server timestamp calibration, if failed then use NTP calibration as backup, don't use both methods simultaneously.
|
|
35
|
+
|
|
36
|
+
6. **Auto-tracking Events**
|
|
37
|
+
|
|
38
|
+
- After SDK initialization recommended to enable auto-tracking immediately after completing time calibration, to timely generate `ta_app_install` `ta_app_start` etc. auto-tracking events, avoid auto-tracking event generation lag;
|
|
39
|
+
|
|
40
|
+
7. **Sensitive Information Collection**
|
|
41
|
+
|
|
42
|
+
- Due to legal requirements, usually need to show privacy policy to user and obtain permission before initializing TE SDK to enable data collection,please follow each country's laws and each app store's requirements to disclose and collect sensitive information;
|
|
43
|
+
- Android SDK will collect `Android ID` etc. information, can set to block in configuration file.
|
|
44
|
+
|
|
45
|
+
8. **Key Data Upload**
|
|
46
|
+
|
|
47
|
+
- Payment, order generation etc. key data recommended to upload from server-side, avoid client upload delay or loss;
|
|
48
|
+
- Important data uploaded from client can call `flush()` to immediately trigger upload.
|
|
49
|
+
|
|
50
|
+
9. **Application Going Overseas**
|
|
51
|
+
|
|
52
|
+
- If application is deployed overseas, recommended TE cluster deploy nearby, avoid crossing firewalls etc. reasons affecting data upload;
|
|
53
|
+
- If application is globally deployed, or data needs to upload from overseas to TE cluster deployed domestically, recommended to deploy one or multiple relay points near application main deployment regions, avoid data loss and delay;
|
|
54
|
+
- For SAAS customers, TE SAAS has already deployed relay points in multiple locations globally, please use TE SAAS overseas upload address `https://global-receiver-ta.thinkingdata.cn`.
|
|
55
|
+
|
|
56
|
+
# II. Server SDK
|
|
57
|
+
|
|
58
|
+
1. **Upload Mode**
|
|
59
|
+
|
|
60
|
+
- Server SDK recommended to use LoggerConsumer combined with Logbus upload, avoid data loss;
|
|
61
|
+
- If using BatchConsumer need to handle upload failure returned exception,some SDKs do not return exceptions, refer specifically to[SDK code](https://github.com/ThinkingDataAnalytics);
|
|
62
|
+
- Formal environment cannot use DebugConsumer;
|
|
63
|
+
|
|
64
|
+
2. **Cache Upload Strategy**
|
|
65
|
+
|
|
66
|
+
- Due to performance reasons, LoggerConsumer batch writes data to file, BatchConsumer batch uploads data;
|
|
67
|
+
- BatchConsumer calling `track()` won't immediately trigger upload, for key data needing immediate upload can call `flush()`;
|
|
68
|
+
|
|
69
|
+
3. **Upload Failure Handling**
|
|
70
|
+
|
|
71
|
+
- For upload failure caused by network fluctuation, BatchConsumer will retry upload 3 times, after 3 failures will discard data and return error message, need to handle error yourself,see each SDK source code for details;
|
|
72
|
+
- Using BatchConsumer if network long time interruption, when cached data count exceeds cache buffer limit (batch\*max_cache_size), will start discarding earliest data, **causing cached data loss**;
|
|
73
|
+
|
|
74
|
+
4. **Close SDK**
|
|
75
|
+
|
|
76
|
+
- When program exits need to close SDK, otherwise will **cause cached data loss**;
|
|
77
|
+
- Server abnormal restart causing SDK abnormal exit, will **cause cached data loss**;
|
|
78
|
+
- Different SDK close methods differ, e.g. `close()`, `ta_free()`,see SDK interface documentation for details;
|
|
79
|
+
|
|
80
|
+
5. **Common Properties and Dynamic Common Properties**
|
|
81
|
+
|
|
82
|
+
- Common properties function suitable for client SDK collecting user-level information, server SDK not recommended to use common properties function;
|
|
83
|
+
|
|
84
|
+
6. **IP, Country, Region Information**
|
|
85
|
+
|
|
86
|
+
- TE data in country region information parsed based on data ip information, client upload TE will auto obtain and store IP information, server upload needs to add "#ip" in data for TE to process;
|
|
87
|
+
|
|
88
|
+
7. **Multi-threading and Multi-process**
|
|
89
|
+
|
|
90
|
+
- Server SDK basically all support multi-threading, `track()` method will do lock processing, can confirm via SDK source code;
|
|
91
|
+
- For multi-process situation, if using LoggerConsumer, each process data needs to write to independent file or independent folder, if writing to same file will **cause data disorder**;
|
|
92
|
+
|
|
93
|
+
8. **Timezone Information**
|
|
94
|
+
|
|
95
|
+
- Client SDK uploaded data will auto have device system timezone information, server SDK data needs to manually add "#zone_offset" property to upload timezone information.
|
|
96
|
+
|
|
97
|
+
# III. Multi-platform Upload
|
|
98
|
+
|
|
99
|
+
For common issues and solutions in multi-platform upload scenarios see Multi-platform Upload Best Practices.
|
|
100
|
+
|
|
101
|
+
1. **User ID Consistency**
|
|
102
|
+
|
|
103
|
+
- When uploading from multiple platforms, need to ensure same user data `#distinct_id` and `#account_id` consistent, otherwise may **cause user fragmentation**;
|
|
104
|
+
- If using single account multi-device analysis system, need to ensure data `#account_id` same and data contains `#distinct_id`, avoid user being fragmented into multiple TE users;
|
|
105
|
+
|
|
106
|
+
2. **Multi-platform Time Alignment**
|
|
107
|
+
|
|
108
|
+
- Client SDK will upload timezone offset "#zone_offset", default takes device system timezone,some SDKs support parameter specification;
|
|
109
|
+
- Server SDK won't auto upload timezone offset "#zone_offset", needs to manually add upload in properties.
|
|
110
|
+
|
|
111
|
+
3. **Avoid Duplicate Upload**
|
|
112
|
+
|
|
113
|
+
- Avoid multi-platform uploading same event, causing data duplication
|
|
114
|
+
|
|
115
|
+
4. **Key Data Upload**
|
|
116
|
+
|
|
117
|
+
- Payment, order generation etc. key data recommended to upload from server-side, avoid client delay or loss.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Unity SDK FAQ"
|
|
3
|
+
code: "unity_sdk_faq"
|
|
4
|
+
source: "Feishu MCP"
|
|
5
|
+
doc_id: "wikcnZ5YKmQd4b26mJQ2uiF6fvd"
|
|
6
|
+
fetched_at: "2026-04-20T17:29:38Z"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
> This document mainly addresses issues for Unity builds on platforms other than Android / iOS. Android / iOS platforms use native SDK by default.
|
|
10
|
+
|
|
11
|
+
# SDK Initialization
|
|
12
|
+
|
|
13
|
+
## Recommended SDK Initialization Location
|
|
14
|
+
|
|
15
|
+
- Recommended to initialize SDK after user agrees to privacy policy
|
|
16
|
+
|
|
17
|
+
## Initialization Methods
|
|
18
|
+
|
|
19
|
+
### Manual Initialization
|
|
20
|
+
|
|
21
|
+
```csharp
|
|
22
|
+
using ThinkingData.Analytics;
|
|
23
|
+
TDAnalytics.Init("APPID","SERVER");
|
|
24
|
+
// Or initialize via TDConfig
|
|
25
|
+
TDConfig config = new TDConfig("APPID","SERVER");
|
|
26
|
+
TDAnalytics.Init(config);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Automatic Initialization
|
|
30
|
+
|
|
31
|
+
- Add TDAnalytics prefab and set SDK configuration
|
|
32
|
+
|
|
33
|
+
# Data Cache Mechanism
|
|
34
|
+
|
|
35
|
+
## Storage Location
|
|
36
|
+
|
|
37
|
+
- Stored via PlayerPrefs, on Mac OS X stored in ~/Library/Preferences
|
|
38
|
+
|
|
39
|
+
## Cache Limit
|
|
40
|
+
|
|
41
|
+
- No upper limit on cached data, cached data has no expiration deletion policy
|
|
42
|
+
|
|
43
|
+
# Data Upload Strategy
|
|
44
|
+
|
|
45
|
+
## Data Upload Trigger Scenarios
|
|
46
|
+
|
|
47
|
+
- APP switches to background
|
|
48
|
+
- Auto-tracking event generated
|
|
49
|
+
- Calling flush() interface
|
|
50
|
+
- Cached data count reaches threshold (default 30 records)
|
|
51
|
+
- Upload time interval exceeds threshold (default 30 seconds)
|
|
52
|
+
- DEBUG / DEBUG_ONLY mode direct upload
|
|
53
|
+
|
|
54
|
+
# Visitor ID (#distinct_id)
|
|
55
|
+
|
|
56
|
+
## Set Visitor ID
|
|
57
|
+
|
|
58
|
+
```csharp
|
|
59
|
+
TDAnalytics.SetDistinctId("Thinker");
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Visitor ID Change Scenarios
|
|
63
|
+
|
|
64
|
+
- User clears application data
|
|
65
|
+
- User uninstall/reinstall or change device
|
|
66
|
+
- Calling SetDistinctId() interface
|
|
67
|
+
|
|
68
|
+
# Account ID (#account_id)
|
|
69
|
+
|
|
70
|
+
## Set Account ID
|
|
71
|
+
|
|
72
|
+
```csharp
|
|
73
|
+
TDAnalytics.Login("TA");
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
# Device ID (#device_id)
|
|
77
|
+
|
|
78
|
+
## Generation Rules
|
|
79
|
+
|
|
80
|
+
- UNITY_WEBGL: Gets System.Guid.NewGuid().ToString("N")
|
|
81
|
+
- Other platforms: Gets SystemInfo.deviceUniqueIdentifier
|
|
82
|
+
|
|
83
|
+
# Debug Mode
|
|
84
|
+
|
|
85
|
+
## Differences between Normal, Debug, DebugOnly Modes
|
|
86
|
+
|
|
87
|
+
| Mode | Upload Mode | Data Storage | Strict Data Check | Data Encryption |
|
|
88
|
+
| --------- | ----------------- | ------------ | ----------------- | --------------- |
|
|
89
|
+
| Normal | Batch Upload | Yes | No | Supported |
|
|
90
|
+
| Debug | One-by-one Upload | Yes | Yes | Not Supported |
|
|
91
|
+
| DebugOnly | One-by-one Upload | No | Yes | Not Supported |
|
|
92
|
+
|
|
93
|
+
# Auto-tracking Events
|
|
94
|
+
|
|
95
|
+
## ta_app_install
|
|
96
|
+
|
|
97
|
+
- Triggered when app is installed or reinstalled after uninstall
|
|
98
|
+
|
|
99
|
+
## ta_app_start
|
|
100
|
+
|
|
101
|
+
- Application gains focus
|
|
102
|
+
|
|
103
|
+
## ta_app_end
|
|
104
|
+
|
|
105
|
+
- Application loses focus or exits
|
|
106
|
+
|
|
107
|
+
## ta_app_crash
|
|
108
|
+
|
|
109
|
+
- Monitors UnhandledException or LogType.Error, etc.
|
|
110
|
+
- Version 2.2.0+ by default collects C# exceptions
|
|
111
|
+
|
|
112
|
+
## ta_scene_loaded / ta_scene_unloaded
|
|
113
|
+
|
|
114
|
+
- Monitors SceneManager callbacks
|
|
115
|
+
|
|
116
|
+
# Common Event Properties
|
|
117
|
+
|
|
118
|
+
## Static Common Event Properties
|
|
119
|
+
|
|
120
|
+
- setSuperProperties method, stored locally
|
|
121
|
+
|
|
122
|
+
## Dynamic Common Event Properties
|
|
123
|
+
|
|
124
|
+
- Callback function is called each time track() is invoked to get current value
|
|
125
|
+
|
|
126
|
+
## Property Priority
|
|
127
|
+
|
|
128
|
+
- User-defined event properties > Dynamic common event properties > Static common event properties
|
|
129
|
+
|
|
130
|
+
# Preset Properties
|
|
131
|
+
|
|
132
|
+
## #ip
|
|
133
|
+
|
|
134
|
+
- TE server obtains ip from http request header
|
|
135
|
+
|
|
136
|
+
## #os
|
|
137
|
+
|
|
138
|
+
- Unity WebGL converted WeChat Mini Game #os is "other"
|
|
139
|
+
|
|
140
|
+
# Exception Issues
|
|
141
|
+
|
|
142
|
+
See complete documentation for details.
|
|
143
|
+
|
|
144
|
+
# Known Issues
|
|
145
|
+
|
|
146
|
+
- Missing #zone_offset issue after building iOS & Android
|
|
147
|
+
- Known bugs in multiple versions and fix versions
|
|
148
|
+
See complete documentation for details.
|