@thinkingai/ae-cli 6.1.38 → 6.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/README.md +2 -0
  2. package/README.zh.md +2 -0
  3. package/dist/{ai-monitor-UL2O7J4X.js → ai-monitor-DST4NDOK.js} +5 -5
  4. package/dist/ai-monitor.js +7 -7
  5. package/dist/{auth-ERWVKQDG.js → auth-BD3NIY3T.js} +3 -3
  6. package/dist/{automation-OQ647CSW.js → automation-IMDCJUML.js} +85 -9
  7. package/dist/{capability-HPP6E3ZX.js → capability-3NJOQHZQ.js} +3 -3
  8. package/dist/{chunk-DKOGWIYQ.js → chunk-24DCOJBJ.js} +2 -2
  9. package/dist/{chunk-SHB7A2JE.js → chunk-2RORKIF6.js} +2 -2
  10. package/dist/{chunk-HBI7IQH3.js → chunk-6NJZSWUT.js} +3 -28
  11. package/dist/{chunk-QPUPWGZ3.js → chunk-DTODOQ6T.js} +1 -1
  12. package/dist/{chunk-PCQTBRPT.js → chunk-FRJUB66C.js} +1 -1
  13. package/dist/{chunk-ZLJZPPPV.js → chunk-IY5G42YY.js} +2 -2
  14. package/dist/{chunk-JRXSLFCA.js → chunk-KBJHBVO7.js} +1 -1
  15. package/dist/{chunk-CYZV5AXW.js → chunk-KE5WGBXS.js} +2 -1
  16. package/dist/chunk-N2MAYIRU.js +32 -0
  17. package/dist/{chunk-DULCIC67.js → chunk-SQEK6S4X.js} +2 -3
  18. package/dist/{chunk-VPLRZSMY.js → chunk-STHIGWWC.js} +10 -1
  19. package/dist/{chunk-BWEQIKA3.js → chunk-TVSGS5QB.js} +5 -5
  20. package/dist/{chunk-LXRALNNA.js → chunk-UK7HQ4IL.js} +1 -1
  21. package/dist/{chunk-NDX4VJO7.js → chunk-VXKKTUU2.js} +2 -2
  22. package/dist/{chunk-E5CJI7L3.js → chunk-WRYXVIJP.js} +1 -1
  23. package/dist/{compat-check-WRPEFB5N.js → compat-check-7VBBE7KO.js} +1 -1
  24. package/dist/{config-IS33K45R.js → config-LFRZBPH5.js} +3 -3
  25. package/dist/{context-Y2A6QIS3.js → context-WJQGJD6F.js} +1 -1
  26. package/dist/{data-integration-EIF5QHYF.js → data-integration-KMJWYAKK.js} +2 -1
  27. package/dist/index.js +34 -32
  28. package/dist/{memory-6QMZS4HF.js → memory-VPOPSU52.js} +3 -3
  29. package/dist/{metadata-TMAXVLOL.js → metadata-AR64J76Z.js} +5 -5
  30. package/dist/{model-LEYRQKOS.js → model-2F2354QP.js} +1 -1
  31. package/dist/{personal-semantic-preference-RMZEDRCJ.js → personal-semantic-preference-BCOSI4DO.js} +4 -4
  32. package/dist/{project-semantic-UD3OAZ6K.js → project-semantic-DJLXAXLD.js} +4 -4
  33. package/dist/{sync-GVF3OI2U.js → sync-4TUIQ2PZ.js} +3 -3
  34. package/dist/{te-agent-S7UH657Z.js → te-agent-EMDWA3M6.js} +4 -4
  35. package/dist/{te-analysis-SJIE5OZY.js → te-analysis-XHAMRMTQ.js} +5 -5
  36. package/dist/{te-community-VNHJDEID.js → te-community-JSUSZEYH.js} +4 -4
  37. package/dist/{te-dataops-AO4OQBQV.js → te-dataops-I264BUTI.js} +2 -2
  38. package/dist/{te-engage-EZJRFG3Q.js → te-engage-XNMQYO5N.js} +68 -16
  39. package/dist/{te-experiment-R2MNSAKV.js → te-experiment-5SCHMYVO.js} +4 -4
  40. package/dist/{te-kb-C44A4BHM.js → te-kb-QQ53TNRZ.js} +44 -13
  41. package/dist/{te-system-DB5Z3LLF.js → te-system-Z4VEB6PL.js} +1 -1
  42. package/dist/{te-team-J52STTEZ.js → te-team-V6BBI52R.js} +87 -6
  43. package/dist/{things-G2QFXDK7.js → things-THHGDSEC.js} +4 -4
  44. package/dist/{update-GEKOZMHU.js → update-53ZUXWV5.js} +2 -2
  45. package/dist/{web-runtime-5M7PRY7R.js → web-runtime-ZJHOIPKX.js} +4 -4
  46. package/dist/{workspace-RZESYB6T.js → workspace-W5ZPVWJS.js} +3 -3
  47. package/package.json +3 -3
  48. package/skills/ae-automation/SKILL.md +6 -2
  49. package/skills/ae-automation/references/cli.md +9 -3
  50. package/skills/ae-engage/SKILL.md +6 -1
  51. package/skills/ae-engage/references/common-metric.md +47 -1
  52. package/skills/ae-engage/references/flow-metric-update.md +1 -1
  53. package/skills/ae-engage/references/task-metric-update.md +1 -1
  54. package/skills/ae-experiment/SKILL.md +1 -1
  55. package/skills/ae-experiment/references/save_experiment.md +1 -1
  56. package/skills/ae-kb/SKILL.md +8 -6
  57. package/skills/ae-kb/references/query-workflow.md +5 -1
  58. package/skills/ae-team/SKILL.md +7 -3
  59. package/skills/ae-team/references/copy-to-personal.md +7 -0
  60. package/skills/ae-team/references/promote.md +7 -0
  61. package/skills/ae-team/references/update.md +3 -3
  62. package/skills/ae-tracking-matrix/SKILL.md +0 -170
  63. package/skills/ae-tracking-matrix/assets//345/237/213/347/202/271/346/250/241/347/211/210.xlsx +0 -0
  64. package/skills/ae-tracking-matrix/i18n.yaml +0 -12
  65. package/skills/ae-tracking-matrix/references/ae-capabilities.md +0 -93
  66. package/skills/ae-tracking-matrix/references/business-semantic-checks.md +0 -30
  67. package/skills/ae-tracking-matrix/references/categories/acquaintance_social_tracking_plan_template.md +0 -256
  68. package/skills/ae-tracking-matrix/references/categories/blockchain_game_tracking_plan_template.md +0 -213
  69. package/skills/ae-tracking-matrix/references/categories/card_game_tracking_plan_template.md +0 -407
  70. package/skills/ae-tracking-matrix/references/categories/casual_game_tracking_plan_template.md +0 -218
  71. package/skills/ae-tracking-matrix/references/categories/casual_music.md +0 -112
  72. package/skills/ae-tracking-matrix/references/categories/chess_cards_tracking_plan_template.md +0 -301
  73. package/skills/ae-tracking-matrix/references/categories/ecommerce_tracking_plan_template.md +0 -356
  74. package/skills/ae-tracking-matrix/references/categories/fishing.md +0 -775
  75. package/skills/ae-tracking-matrix/references/categories/game_basic_module_tracking_plan.md +0 -89
  76. package/skills/ae-tracking-matrix/references/categories/idle_card.md +0 -27
  77. package/skills/ae-tracking-matrix/references/categories/idle_game_tracking_plan_template.md +0 -415
  78. package/skills/ae-tracking-matrix/references/categories/interactive_video.md +0 -133
  79. package/skills/ae-tracking-matrix/references/categories/merge.md +0 -639
  80. package/skills/ae-tracking-matrix/references/categories/mmo_mobile_tracking_plan_template.md +0 -406
  81. package/skills/ae-tracking-matrix/references/categories/mmo_web.md +0 -230
  82. package/skills/ae-tracking-matrix/references/categories/music.md +0 -137
  83. package/skills/ae-tracking-matrix/references/categories/online_education_tracking_plan_template.md +0 -414
  84. package/skills/ae-tracking-matrix/references/categories/qipai_mj.md +0 -199
  85. package/skills/ae-tracking-matrix/references/categories/reading_tracking_plan_template.md +0 -158
  86. package/skills/ae-tracking-matrix/references/categories/roguelike_tracking_plan_template.md +0 -546
  87. package/skills/ae-tracking-matrix/references/categories/rpg.md +0 -195
  88. package/skills/ae-tracking-matrix/references/categories/short_drama_tracking_plan_template.md +0 -115
  89. package/skills/ae-tracking-matrix/references/categories/simulation_business_tracking_plan_template.md +0 -151
  90. package/skills/ae-tracking-matrix/references/categories/slg_tracking_plan_template.md +0 -260
  91. package/skills/ae-tracking-matrix/references/categories/slots_tracking_plan_template.md +0 -232
  92. package/skills/ae-tracking-matrix/references/categories/stranger_social_tracking_plan_template.md +0 -359
  93. package/skills/ae-tracking-matrix/references/categories/tower_defense.md +0 -365
  94. package/skills/ae-tracking-matrix/references/categories/video_editor_tracking_plan_template.md +0 -211
  95. package/skills/ae-tracking-matrix/references/categories/wechat_minigame.md +0 -132
  96. package/skills/ae-tracking-matrix/references/category-registry.md +0 -77
  97. package/skills/ae-tracking-matrix/references/data-verification/diagnosis_kb.md +0 -230
  98. package/skills/ae-tracking-matrix/references/data-verification/sql_checks.md +0 -406
  99. package/skills/ae-tracking-matrix/references/data-verification/tracking_plan_comparison.md +0 -128
  100. package/skills/ae-tracking-matrix/references/eval-cases.md +0 -74
  101. package/skills/ae-tracking-matrix/references/naming-dict.md +0 -238
  102. package/skills/ae-tracking-matrix/references/optimization-checklist.md +0 -85
  103. package/skills/ae-tracking-matrix/references/plan-generation/export-schema.md +0 -142
  104. package/skills/ae-tracking-matrix/references/plan-generation/module-baseline.md +0 -47
  105. package/skills/ae-tracking-matrix/references/plan-generation/reference.md +0 -794
  106. package/skills/ae-tracking-matrix/references/plan-generation/template-catalog.md +0 -94
  107. package/skills/ae-tracking-matrix/references/scene-routing.md +0 -80
  108. package/skills/ae-tracking-matrix/references/sdk/client-sdk/android.md +0 -3787
  109. package/skills/ae-tracking-matrix/references/sdk/client-sdk/c.md +0 -827
  110. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-lua.md +0 -655
  111. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-x.md +0 -953
  112. package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocoscreator.md +0 -1128
  113. package/skills/ae-tracking-matrix/references/sdk/client-sdk/corona.md +0 -714
  114. package/skills/ae-tracking-matrix/references/sdk/client-sdk/egret.md +0 -1268
  115. package/skills/ae-tracking-matrix/references/sdk/client-sdk/flutter.md +0 -776
  116. package/skills/ae-tracking-matrix/references/sdk/client-sdk/h5-and-app-sdk-integration.md +0 -182
  117. package/skills/ae-tracking-matrix/references/sdk/client-sdk/ios.md +0 -2755
  118. package/skills/ae-tracking-matrix/references/sdk/client-sdk/javascript.md +0 -1182
  119. package/skills/ae-tracking-matrix/references/sdk/client-sdk/layaair.md +0 -1300
  120. package/skills/ae-tracking-matrix/references/sdk/client-sdk/macos.md +0 -1369
  121. package/skills/ae-tracking-matrix/references/sdk/client-sdk/mini-program-mini-game.md +0 -1692
  122. package/skills/ae-tracking-matrix/references/sdk/client-sdk/openharmony.md +0 -902
  123. package/skills/ae-tracking-matrix/references/sdk/client-sdk/react-native.md +0 -763
  124. package/skills/ae-tracking-matrix/references/sdk/client-sdk/uni-app.md +0 -1107
  125. package/skills/ae-tracking-matrix/references/sdk/client-sdk/unity.md +0 -1532
  126. package/skills/ae-tracking-matrix/references/sdk/client-sdk/unreal.md +0 -845
  127. package/skills/ae-tracking-matrix/references/sdk/faq/android_sdk_faq.md +0 -228
  128. package/skills/ae-tracking-matrix/references/sdk/faq/ios_sdk_faq.md +0 -149
  129. package/skills/ae-tracking-matrix/references/sdk/faq/java_sdk_faq.md +0 -407
  130. package/skills/ae-tracking-matrix/references/sdk/faq/javascript_sdk_faq.md +0 -163
  131. package/skills/ae-tracking-matrix/references/sdk/faq/minigame_sdk_faq.md +0 -149
  132. package/skills/ae-tracking-matrix/references/sdk/faq/miniprogram_sdk_faq.md +0 -153
  133. package/skills/ae-tracking-matrix/references/sdk/faq/python_sdk_faq.md +0 -232
  134. package/skills/ae-tracking-matrix/references/sdk/faq/sdk_log_guide.md +0 -314
  135. package/skills/ae-tracking-matrix/references/sdk/faq/sdk_usage_notes.md +0 -117
  136. package/skills/ae-tracking-matrix/references/sdk/faq/unity_sdk_faq.md +0 -148
  137. package/skills/ae-tracking-matrix/references/sdk/integration-tools/filebeat-logstash-guide.md +0 -645
  138. package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_guide.md +0 -307
  139. package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_parser_plugin.md +0 -347
  140. package/skills/ae-tracking-matrix/references/sdk/integration-tools/restful_api_notes.md +0 -72
  141. package/skills/ae-tracking-matrix/references/sdk/integration-tools/ta-datax-writer-guide.md +0 -264
  142. package/skills/ae-tracking-matrix/references/sdk/server-sdk/c.md +0 -566
  143. package/skills/ae-tracking-matrix/references/sdk/server-sdk/erlang.md +0 -409
  144. package/skills/ae-tracking-matrix/references/sdk/server-sdk/golang.md +0 -446
  145. package/skills/ae-tracking-matrix/references/sdk/server-sdk/java.md +0 -557
  146. package/skills/ae-tracking-matrix/references/sdk/server-sdk/lua.md +0 -457
  147. package/skills/ae-tracking-matrix/references/sdk/server-sdk/nodejs.md +0 -490
  148. package/skills/ae-tracking-matrix/references/sdk/server-sdk/php.md +0 -523
  149. package/skills/ae-tracking-matrix/references/sdk/server-sdk/python.md +0 -484
  150. package/skills/ae-tracking-matrix/references/sdk/server-sdk/ruby.md +0 -442
  151. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/data-rules.md +0 -391
  152. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/first-event-validation.md +0 -91
  153. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/preset-properties-system-fields.md +0 -635
  154. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/updatable-events.md +0 -113
  155. package/skills/ae-tracking-matrix/references/sdk/te-data-rules/user-identification-rules.md +0 -466
  156. package/skills/ae-tracking-matrix/references/standard-base/README.md +0 -22
  157. package/skills/ae-tracking-matrix/references/standard-base/basic_event_data.md +0 -174
  158. package/skills/ae-tracking-matrix/references/standard-base/common_event_properties.md +0 -20
  159. package/skills/ae-tracking-matrix/references/standard-base/common_event_properties_setup.md +0 -7
  160. package/skills/ae-tracking-matrix/references/standard-base/data_type_design_principles.md +0 -14
  161. package/skills/ae-tracking-matrix/references/standard-base/gameplay_event_data.md +0 -370
  162. package/skills/ae-tracking-matrix/references/standard-base/id_system_faq.md +0 -47
  163. package/skills/ae-tracking-matrix/references/standard-base/integration_must_know.md +0 -37
  164. package/skills/ae-tracking-matrix/references/standard-base/multi_platform_integration_notes.md +0 -27
  165. package/skills/ae-tracking-matrix/references/standard-base/multi_user_id_system_recommendations.md +0 -23
  166. package/skills/ae-tracking-matrix/references/standard-base/tracking_notes.md +0 -14
  167. package/skills/ae-tracking-matrix/references/standard-base/user_data.md +0 -46
  168. package/skills/ae-tracking-matrix/references/standard-base/user_id_system.md +0 -13
  169. package/skills/ae-tracking-matrix/references/system-fields.md +0 -297
  170. package/skills/ae-tracking-matrix/references/te-field-translations.md +0 -1791
  171. package/skills/ae-tracking-matrix/references/workflows/data-verification.md +0 -232
  172. package/skills/ae-tracking-matrix/references/workflows/feasibility-analysis.md +0 -829
  173. package/skills/ae-tracking-matrix/references/workflows/integration-qna.md +0 -355
  174. package/skills/ae-tracking-matrix/references/workflows/plan-generation.md +0 -283
  175. package/skills/ae-tracking-matrix/references/workflows/plan-lint.md +0 -168
  176. package/skills/ae-tracking-matrix/references/workflows/plan-review-optimize.md +0 -205
  177. package/skills/ae-tracking-matrix/references/workflows/prd-to-suggestions.md +0 -75
  178. package/skills/ae-tracking-matrix/references/workflows/troubleshooting.md +0 -36
  179. package/skills/ae-tracking-matrix/references/workflows/validated-upload.md +0 -107
  180. package/skills/ae-tracking-matrix/scripts/build_template_catalog.py +0 -114
  181. package/skills/ae-tracking-matrix/scripts/export_tracking_plan.py +0 -53
  182. package/skills/ae-tracking-matrix/scripts/finalize_plan.py +0 -166
  183. package/skills/ae-tracking-matrix/scripts/lint_tracking_plan.py +0 -674
  184. package/skills/ae-tracking-matrix/scripts/plan_contract.py +0 -200
  185. package/skills/ae-tracking-matrix/scripts/plan_types.py +0 -60
  186. package/skills/ae-tracking-matrix/scripts/prepare_delivery.py +0 -169
  187. package/skills/ae-tracking-matrix/scripts/sync_plan.py +0 -296
  188. package/skills/ae-tracking-matrix/scripts/upload_plan.py +0 -340
@@ -1,391 +0,0 @@
1
- ---
2
- code: data_format
3
- name: "Data Rules"
4
- wikiToken: BxBWwrjHYiJGgbkKVxtcaKOmnNv
5
- parentWikiToken: Bmhewqk5PiJirhk1GJzcJliqnOh
6
- updateTime: 1768384216000
7
- sourceUrl: https://docs-v2.thinkingdata.cn/?version=6.0&lan=zh-CN&code=data_format
8
- ---
9
-
10
- # Data Rules
11
-
12
- This chapter will detail the TE backend data structure, data types, and data limitations. Through this chapter, you will learn how to construct data that conforms to the rules and troubleshoot data transmission issues.
13
-
14
- **If you are using LogBus or RESTful API to upload data, you need to format the data according to the data rules in this chapter.**
15
-
16
- ### I. Data Structure
17
-
18
- The TE backend accepts JSON data that conforms to the rules: if using SDK integration, the data will be converted to JSON format for transmission. If using LogBus or POST method to upload data, the data needs to be JSON data that conforms to the rules.
19
-
20
- JSON data is organized by lines: one line contains one JSON data, which corresponds to one piece of data physically, and semantically corresponds to one user behavior, or one user attribute setting operation.
21
-
22
- The data format and requirements are as follows (for readability, the data has been formatted, please do not use line breaks in actual environment):
23
-
24
- - Here is a sample event data:
25
-
26
- ```
27
- {
28
- "#account_id": "ABCDEFG-123-abc",
29
- "#distinct_id": "F53A58ED-E5DA-4F18-B082-7E1228746E88",
30
- "#type": "track",
31
- "#ip": "192.168.171.111",
32
- "#uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
33
- "#time": "2017-12-18 14:37:28.527",
34
- "#event_name": "test",
35
- "properties": {
36
- "argString": "abc",
37
- "argNum": 123,
38
- "argBool": true
39
- }
40
- }
41
- ```
42
-
43
- - Here is a sample user attribute setting:
44
-
45
- ```
46
- {
47
- "#account_id": "ABCDEFG-123-abc",
48
- "#distinct_id": "F53A58ED-E5DA-4F18-B082-7E1228746E88",
49
- "#type": "user_set",
50
- "#uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
51
- "#time": "2017-12-18 14:37:28.527",
52
- "properties": {
53
- "userArgString": "abc",
54
- "userArgNum": 123,
55
- "userArgBool": true
56
- }
57
- }
58
- ```
59
-
60
- _The value of "#type" can be replaced with "user_setOnce", "user_add", "user_unset", "user_append", "user_del"_
61
-
62
- From a structural and functional perspective, a JSON data can be divided into two parts:
63
-
64
- **Other fields at the same level as "properties" constitute the basic information of this data, including only the following items:**
65
-
66
- - The account ID `#account_id` and visitor ID `#distinct_id` representing the triggering user
67
- - The trigger time `#time`, can be precise to seconds or milliseconds
68
- - The data type (event or user attribute setting) `#type`
69
- - The event name `#event_name` (only present in event data)
70
- - The user IP `#ip`
71
- - The unique identifier `#uuid`
72
- Please note that apart from the above items, all other properties starting with "#" must be placed inside properties
73
-
74
- **The inner layer of "properties" is the content of this data, which includes the attributes in events, or user attributes to be set. These are used directly as attributes or analysis objects in backend analysis.**
75
-
76
- Structurally, these two parts are similar to the header and content of a message. Next, we will detail the meaning of each field in these two parts.
77
-
78
- #### 1.1 Data Information Section
79
-
80
- As shown in the red box below, several fields at the same level as "properties" constitute the information section of this data:
81
-
82
- These fields contain data information such as the triggering user and trigger time. Their characteristic is that all fields start with "#". This section will explain the meaning and configuration of each field.
83
-
84
- <!-- unsupported block: 22 -->
85
-
86
- ##### 1.1.1 User Information (`#account_id` and `#distinct_id`)
87
-
88
- `#account_id` and `#distinct_id` are two fields used by the TE backend to identify users. `#account_id` is the user's ID in logged-in state, and `#distinct_id` is the user's identifier in non-logged-in state. The TE backend will determine the triggering user based on these two fields, with priority given to `#account_id`. See the User Identification Rules chapter for specific rules.
89
-
90
- At least one of `#account_id` or `#distinct_id` must be passed. If all events are triggered when the user is logged in, only passing `#account_id` is acceptable. If there are events triggered in non-logged-in state (including before registration), it is recommended to fill in both fields.
91
-
92
- <!-- unsupported block: 22 -->
93
-
94
- ##### 1.1.2 Data Type Information (`#type` and `#event_name`)
95
-
96
- `#type` determines the type of this data, whether it's a user behavior record or an operation to modify user attributes. **Every data must configure the `#type` field.** The values of `#type` are divided into two categories: `track` means this data is a user behavior record, and values starting with `user_` mean operations on user attributes. The specific meanings are as follows:
97
-
98
- 1. track: Pass an event to the event table, all event uploads are track
99
- 1. user_set: Operation on user table, overwrite one or more user attributes, if the attribute already has a value, overwrite the previous value
100
- 1. user_setOnce: Operation on user table, initialize one or more user attributes, if the attribute already has a value, ignore this operation
101
- 1. user_add: Operation on user table, perform cumulative calculation for one or more numeric user attributes
102
- 1. user_unset: Operation on user table, clear the values of one or more user attributes for this user
103
- 1. user_del: Operation on user table, delete this user
104
- 1. user_append: Operation on user table, add elements to the user's list type attribute values
105
- 1. user*uniq_append: Operation on user table, add elements to the user's list type attribute values, and perform a full list deduplication (deduplication preserves the original order of elements)
106
- When the value of `#type` is `track`, i.e., this data is a behavior record, \*\*you must configure the event name `#event_name`, which must start with a letter, can only contain: letters (case-sensitive), numbers and underscore "*", maximum length is 50 characters. Please ensure there are no spaces when configuring.\*\* If this data is an operation to modify user attributes, the `#event_name` field is not required.
107
-
108
- Note that user attributes are attributes that have node significance for users. It is not recommended to modify them frequently in a short time. For attributes that need frequent changes, it is recommended to put them in events as event attributes.
109
-
110
- <!-- unsupported block: 22 -->
111
-
112
- ##### 1.1.3 Trigger Time (`#time`)
113
-
114
- `#time` is the time when the event occurred, **must be configured**, the format must be a string precise to milliseconds ("yyyy-MM-dd HH:mm:ss.SSS") or seconds ("yyyy-MM-dd HH:mm:ss")
115
-
116
- Although data for operations on the User table also needs to configure `#time`, operations on user attributes will be performed in the order the backend receives the data.
117
-
118
- _For example, if a user re-uploads user table operation data from a past day, both attribute overwrite and initialization will proceed normally, without judging based on the #time field_
119
-
120
- <!-- unsupported block: 22 -->
121
-
122
- ##### 1.1.4 Trigger Location (`#ip`)
123
-
124
- `#ip` is the device's IP address, optional configuration. TE will calculate the user's geographic location based on the IP address. If you pass #country, #province, #city and other geographic location attributes in "properties", the values you passed will be used.
125
-
126
- <!-- unsupported block: 22 -->
127
-
128
- ##### 1.1.5 Data Unique ID (`#uuid`)
129
-
130
- `#uuid` is a field used to indicate data uniqueness, optional configuration, the format must be standard UUID format. TE will, depending on data volume, within a certain period of time, check at the receiving end whether data with the same `#uuid` appears within a short time (i.e., duplicate data), and directly discard duplicate data, not storing it.
131
-
132
- **Note that receiving-end validation through `#uuid` only validates data received in the past few hours, mainly to solve short-term data duplication caused by network jitter issues. It cannot validate received data against all data. If you need to deduplicate data, please contact TE staff.**
133
-
134
- <!-- unsupported block: 22 -->
135
-
136
- #### 1.2 Data Content Section
137
-
138
- The other part of the data is what's contained inside `properties`. `properties` is a JSON object, and the data inside is represented as key-value pairs. If it's user behavior data, it represents the attributes and indicators of that behavior (equivalent to fields in the behavior table), and these attributes and indicators can be used directly in analysis; if it's an operation on user attributes, it represents the attribute content to be set.
139
-
140
- The key value is the name of that attribute, the type is string. Custom attributes must start with a letter, can only contain: letters (case-insensitive), numbers and underscore "\_", and maximum length is 50 characters; there are also TE preset attributes starting with `#`, you can learn more in the Preset Attributes chapter, but note that in most cases it's recommended to only use custom attributes, not use #.
141
-
142
- The value is the value of that attribute, can be numeric, text, time, boolean, list, object, object group. The data type representation is shown in the table below:
143
-
144
- **TE Data Type**
145
-
146
- **Sample Value**
147
-
148
- **Value Description**
149
-
150
- **Data Type**
151
-
152
- Numeric
153
-
154
- 123,1.23
155
-
156
- Data range is -9E15 to 9E15
157
-
158
- Number
159
-
160
- Text
161
-
162
- "ABC","Shanghai"
163
-
164
- Character default upper limit is 2KB
165
-
166
- String
167
-
168
- Time
169
-
170
- "2019-01-01 00:00:00","2019-01-01 00:00:00.000"
171
-
172
- "yyyy-MM-dd HH:mm:ss.SSS" or "yyyy-MM-dd HH:mm:ss", if you need to represent a date, you can use "yyyy-MM-dd 00:00:00"
173
-
174
- String
175
-
176
- Boolean
177
-
178
- true,false
179
-
180
- -
181
-
182
- Boolean
183
-
184
- List
185
-
186
- ["a","1","true"]
187
-
188
- Elements in the list will be converted to string type, maximum 500 elements in the list
189
-
190
- Array(String)
191
-
192
- Object
193
-
194
- {"hero_name":"Liu Bei","hero_level":22,"hero_equipment": ["Dual Swords","Red Horse"],"hero_if_support":false}
195
-
196
- Each sub-attribute (Key) in the object has its own data type, for value description please refer to the corresponding type of regular attributes above
197
-
198
- Maximum 100 sub-attributes in object
199
-
200
- Object
201
-
202
- Object Group
203
-
204
- [{"hero_name":"Liu Bei","hero_level":22,"hero_equipment": ["Dual Swords","Red Horse"],"hero_if_support":false}, {"hero_name":"Liu Bei","hero_level":22,"hero_equipment": ["Dual Swords","Red Horse"],"hero_if_support":false}]
205
-
206
- Each sub-attribute (Key) in the object group has its own data type, for value description please refer to the corresponding type of regular attributes above
207
-
208
- Maximum 500 objects in object group
209
-
210
- Array(Object)
211
-
212
- Note that the type of all attributes will be determined based on the type of the attribute value received the first time. Subsequent data types must be consistent with the corresponding attribute type. Attributes with mismatched types will be discarded (other attributes of this data that conform to the type will be retained), and TE will not perform type compatibility conversion.
213
-
214
- ### II. Data Processing Rules
215
-
216
- After receiving data, the TE server will perform some processing. This section will explain the processing rules of the TE backend combined with actual usage scenarios:
217
-
218
- #### 2.1 Receiving New Event Data
219
-
220
- After receiving new event data, the TE backend will automatically create the association model for the new event and its attributes; if new attributes are received, the attribute type when the attribute is first received will be set as the attribute's type, and the attribute type cannot be modified afterwards.
221
-
222
- <!-- unsupported block: 22 -->
223
-
224
- #### 2.2 Adding Event Attributes
225
-
226
- If you need to add attributes to an existing event, just pass the new attributes together when uploading data. The TE backend will dynamically associate the event with the new attributes, no other configuration is needed.
227
-
228
- <!-- unsupported block: 22 -->
229
-
230
- #### 2.3 Handling Attribute Type Inconsistency
231
-
232
- When receiving an event data where the type of an attribute is inconsistent with the existing attribute type in the backend, the value of that attribute will be discarded (i.e., the value becomes null).
233
-
234
- <!-- unsupported block: 22 -->
235
-
236
- #### 2.4 Deprecating Event Attributes
237
-
238
- If you need to deprecate an event attribute, just hide that attribute in the data management module of the TE backend. Subsequent transmitted data may not include that attribute. The TE backend will not delete the attribute's data, and the hiding operation is reversible. If the attribute is still transmitted after being hidden, the attribute value will still be retained.
239
-
240
- <!-- unsupported block: 22 -->
241
-
242
- #### 2.5 Shared Attributes Across Events
243
-
244
- Same-name attributes across different events are considered the same attribute with consistent type. Therefore, you need to ensure all same-name attributes have consistent types to avoid attribute values being discarded due to type inconsistency.
245
-
246
- <!-- unsupported block: 22 -->
247
-
248
- #### 2.6 User Table Operation Logic
249
-
250
- Modifying user data in the user table, i.e., data where the `#type` field in the uploaded data is `user_set`, `user_setOnce`, `user_add`, `user_unset`, `user_append` or `user_del`, can essentially be seen as a command, i.e., an operation on the user table data of the user referred to by that data. The operation type is determined by the `#type` field, and the operation content is determined by the attributes in `properties`.
251
-
252
- Here are the specific logic for major user table attribute operations:
253
-
254
- ##### 2.6.1 Overwrite User Attributes (user_set)
255
-
256
- Determine the user to operate on based on the user ID in the data, then based on the attributes in `properties`, overwrite all attributes. If an attribute does not exist, create that attribute.
257
-
258
- ##### 2.6.2 Initialize User Attributes (user_setOnce)
259
-
260
- Determine the user to operate on based on the user ID in the data, then based on the attributes in `properties`, set attributes that have not been assigned (empty). If an attribute that needs to be set for this user already has a value, no overwrite will be performed. If an attribute does not exist, create that attribute.
261
-
262
- ##### 2.6.3 Accumulate User Attributes (user_add)
263
-
264
- Determine the user to operate on based on the user ID in the data, then based on the attributes in `properties`, perform accumulation operation on numeric attributes. If a negative value is passed, it's equivalent to subtracting the passed value from the original attribute value. If an attribute that needs to be set for this user has not been assigned (empty), it will default to 0 before performing the accumulation operation. If the attribute does not exist, create that attribute.
265
-
266
- ##### 2.6.4 Clear User Attribute Values (user_unset)
267
-
268
- Determine the user to operate on based on the user ID in the data, then based on the attributes in `properties`, clear all those attributes (i.e., set to NULL). If an attribute does not exist, it **will not** be created.
269
-
270
- ##### 2.6.5 Add Elements to List Type User Attributes (user_append)
271
-
272
- Determine the user to operate on based on the user ID in the data, then based on the attributes in `properties`, perform element addition operation on list type attributes.
273
-
274
- ##### 2.6.6 Delete User (user_del)
275
-
276
- Determine the user to operate on based on the user ID in the data, delete this user from the user table. This user's event data **will not** be deleted.
277
-
278
- ##### 2.6.7 Add Elements to List Type User Attributes with Deduplication (user_uniq_append)
279
-
280
- Determine the user to operate on based on the user ID in the data, then based on the attributes in `properties`, perform element addition operation on list type attributes, and perform a full list deduplication (deduplication preserves the original order of elements).
281
-
282
- <!-- unsupported block: 22 -->
283
-
284
- ### III. Data Limitations
285
-
286
- - **Event Type and Attribute Quantity Limits**
287
- For performance considerations, the TE backend will by default limit the number of event types and attributes for projects:
288
-
289
- **Limit**
290
-
291
- **Event Type Upper Limit**
292
-
293
- **Event Attribute Upper Limit**
294
-
295
- **User Attribute Upper Limit**
296
-
297
- Recommended no more than
298
-
299
- 100
300
-
301
- 300
302
-
303
- 100
304
-
305
- Hardware limit
306
-
307
- 500
308
-
309
- 1000
310
-
311
- 500
312
-
313
- Administrators can enter the "Project Management" page to query the number of event types and attributes already used in each project. Contact TE staff to apply for increasing the upper limits for event types and attribute quantities.
314
-
315
- - **Account ID (#account_id), Visitor ID (#distinct_id) Length Limits**
316
-
317
- ```
318
- * Projects created before version 3.1: 64 characters; to expand to 128 characters, please contact TE staff
319
-
320
- * Projects created in version 3.1 and later: 128 characters
321
- ```
322
-
323
- - **Event, Attribute Name Limits**
324
-
325
- ```
326
- * Event name: `String` type, starts with a letter, can contain numbers, uppercase and lowercase letters and underscore "\_", maximum length is 50 characters
327
-
328
- * Attribute name: `String` type, starts with a letter, can contain numbers, letters (case-insensitive) and underscore "\_", maximum length is 50 characters. Only preset attributes can start with #.
329
- ```
330
-
331
- - **Text, Numeric, List, Object, Object Group Type Attribute Data Range**
332
-
333
- ```
334
- * Text: String upper limit is 2KB
335
-
336
- * Numeric: Data range is -9E15 to 9E15
337
-
338
- * List: Maximum 500 elements; each element is string type, upper limit is 255 bytes
339
-
340
- * Object: Maximum 100 sub-attributes;
341
-
342
- * Object Group: Maximum 500 objects;
343
- ```
344
-
345
- - **Data Receiving Time Limit**
346
-
347
- ```
348
- * Server data receiving event upper limit: 3 years before to 3 days after relative to server time
349
-
350
- * Client data receiving event upper limit: 10 days before to 3 days after relative to server time
351
- ```
352
-
353
- ### IV. Other Rules
354
-
355
- 1. Please encode data using UTF-8 to avoid character encoding issues
356
- 1. TE backend attribute names are case-insensitive, recommend using "\_" as word separator
357
- 1. TE backend by default only receives data from the past three years. Data older than three years cannot be entered. If you need to enter data older than three years, contact TE staff to extend the time limit
358
-
359
- ### V. Common Issues
360
-
361
- This section summarizes common issues caused by data not conforming to data rules. If there are data transmission issues, you can troubleshoot based on this section content first
362
-
363
- #### 5.1 TE Backend Did Not Receive Data
364
-
365
- **If using SDK transmission:**
366
-
367
- 1. Please confirm whether the SDK has been successfully integrated
368
- 1. Check whether APPID and transmission URL are set correctly, whether transmission port number and transmission method corresponding suffix are missing
369
-
370
- **If using LogBus or POST method transmission:**
371
-
372
- 1. Please confirm whether APPID and transmission URL are set correctly, whether transmission port number and transmission method corresponding suffix are missing
373
- 1. Please check whether data is transmitted in JSON format, and ensure one JSON data per line
374
- 1. Please check whether key values in the data information section start with "#", whether required fields are missing
375
- 1. Please check whether the type and format (time format) of value values in the data information section are correct
376
- 1. Please check whether the value of "#event_name" conforms to specifications, does not contain Chinese characters, spaces, etc.
377
- 1. "properties" should not start with "#"
378
-
379
- - Also, note that user attribute settings do not produce behavior records. Therefore, if only `user_set` and other data are uploaded, data cannot be directly queried in the backend behavior analysis models (except SQL queries)
380
- - Please note the upload data time. Data from too long ago (more than three years) will not be entered; if uploading historical data, it may be that the query period does not cover the upload data time, please adjust the query period
381
-
382
- #### 5.2 Data Has Missing Parts, Some Attributes Not Received
383
-
384
- 1. Please confirm that attribute key values in the data content section conform to specifications, do not contain Chinese characters, spaces, etc.
385
- 1. Please confirm that among attribute key values in the data content section, those starting with "#" are preset attributes
386
- 1. Please check whether the type of missing attributes when uploading is consistent with the attribute type in the backend. You can view the type of received attributes in the backend metadata management
387
-
388
- #### 5.3 Data Transmission Has Errors, Want to Delete Data
389
-
390
- 1. Users with private deployment services can use the data deletion tool to self-service delete data; if you are a cloud service user, you can contact TE staff for data deletion
391
- 1. If there are major data changes, it is recommended to directly create a new project. It is recommended that users conduct complete data testing in a test project before formally transmitting data
@@ -1,91 +0,0 @@
1
- ---
2
- code: first_check_id
3
- name: "First Event Validation"
4
- wikiToken: VcMswVyheiYNqek35fKcFYiEnTg
5
- parentWikiToken: Ljs3w406DiyDLnktFuAcHogInvg
6
- updateTime: 1745309948000
7
- sourceUrl: https://docs-v2.thinkingdata.cn/?version=6.0&lan=zh-CN&code=first_check_id
8
- ---
9
-
10
- # First Event Validation
11
-
12
- This chapter will introduce the usage of TE system's special data structure - First Event Validation. First Event Validation is a data filtering feature that adds a unique identifier ID to event data. When the system receives data, it checks whether this ID has appeared before. Data with IDs that have already appeared will not be stored. Data with IDs that have not appeared can be stored, and the ID will be recorded, ensuring only the first occurrence of an ID is stored.
13
-
14
- ::: warning
15
-
16
- First Event Validation has significant performance overhead. It is not recommended to add this validation to all events, and it should be used with assistance from TE staff.
17
-
18
- :::
19
-
20
- ### I. Data Structure
21
-
22
- To use the "First Event Validation" feature, one adjustment is needed in the data:
23
-
24
- - Add ID field `#first_check_id`, which must be of string type. This field is the identifier ID for validating first events. The first occurrence of this ID will be stored, subsequent occurrences will not be stored. `#first_check_id` for different events are independent of each other, so the first validation for each event does not interfere with others
25
-
26
- Here is a sample data, you can see where `#first_check_id` is located:
27
-
28
- ```
29
- {
30
- "#account_id": "ABCDEFG-123-abc",
31
- "#distinct_id": "F53A58ED-E5DA-4F18-B082-7E1228746E88",
32
- "#type": "track",
33
- "#ip": "192.168.171.111",
34
- "#uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
35
- "#time": "2017-12-18 14:37:28.527",
36
- "#first_check_id": "123456",
37
- "#event_name": "test",
38
- "properties": {
39
- "argString": "abc",
40
- "argNum": 123,
41
- "argBool": true
42
- }
43
- }
44
- ```
45
-
46
- The `#first_check_id` in the above data is "123456". If event "test" has already stored another data with `#first_check_id` of "123456", then this data cannot be stored. If no such data has been stored before, this data can be stored.
47
-
48
- ### II. Data Processing Logic
49
-
50
- The TE system maintains an ID table for each event. ID tables for different events are independent of each other.
51
-
52
- When the system receives event data with `#first_check_id`, it will search for the `#first_check_id` of this data in the corresponding event's ID table. Based on the search result, different processing will be performed:
53
-
54
- 1. If the `#first_check_id` does not exist in the ID table, then this data passes validation, will be directly stored, and the `#first_check_id` will be recorded in the ID table
55
- 1. If the `#first_check_id` exists in the ID table, then this data will be directly discarded
56
-
57
- If the same event has both data with `#first_check_id` and data without this field uploaded, then data without this field will not undergo first event validation processing, consistent with regular data.
58
-
59
- ::: tip
60
-
61
- Besides the key logic above, there are two additional notes:
62
-
63
- 1. To ensure performance, the system uses scheduled batch processing for validation, with a default interval of 1 hour. Therefore, event data using first event validation will have a default 1 hour query delay
64
-
65
- 2. "#first_check_id" is not recorded in the database after processing. If you need to record it, please use an event attribute to record it
66
-
67
- :::
68
-
69
- ### III. Best Practices
70
-
71
- #### Device Addition
72
-
73
- Device addition data is very suitable for first event validation. You can report a "Device Addition" event with device ID as `#first_check_id` each time the app starts. According to the logic of first event validation, only the first occurrence of each device ID's "Device Addition" event will be recorded, subsequent occurrences will be discarded. Therefore, the stored events are the first occurrence of each device ID, matching the logic of device addition.
74
-
75
- Here is a sample of "Device Addition" event using first event validation:
76
-
77
- ```
78
- {
79
- "#distinct_id": "F53A58ED-E5DA-4F18-B082-7E1228746E88",
80
- "#type": "track",
81
- "#ip": "192.168.171.111",
82
- "#time": "2017-12-18 14:37:28.527",
83
- "#first_check_id": "device_id_123456",
84
- "#event_name": "new_device",
85
- "properties": {
86
- "device_id": "device_id_123456"
87
- }
88
- }
89
- ```
90
-
91
- This event can be reported each time the app starts, using the device ID as `#first_check_id`; besides that, other attributes can be added, such as "Device Model", "Source Channel", etc., to increase dimensions for analysis. For TE client SDK or server SDK, you can refer to the corresponding SDK's integration guide. The "Updatable Events" and "Overwritable Events" sections in the guide will provide detailed interface calling methods.