@thinkingai/ae-cli 1.0.28 → 6.0.16
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 +1 -16
- package/README.zh.md +1 -16
- package/dist/{auth-H2376DEF.js → auth-DYC2BGLM.js} +2 -2
- package/dist/{auth-5NSDQFQB.js → auth-GHBMJ5ZR.js} +31 -12
- package/dist/{chunk-CLJF7MQA.js → chunk-2DUEAXV3.js} +1 -1
- package/dist/chunk-5OC7CYCG.js +98 -0
- package/dist/{chunk-SRJIAOBN.js → chunk-6W4QOZAL.js} +10 -0
- package/dist/{chunk-LU7SXK4Q.js → chunk-BJX3GXWC.js} +2 -2
- package/dist/{chunk-WCHI7725.js → chunk-DMMEPCST.js} +47 -6
- package/dist/{chunk-IMBKVXKY.js → chunk-EGEIXA2Z.js} +82 -10
- package/dist/{chunk-AD5V3ZPJ.js → chunk-I5CRVM2S.js} +98 -10
- package/dist/chunk-NOO24N7W.js +11 -0
- package/dist/{chunk-GSJGPNKK.js → chunk-PN3OS34E.js} +1 -1
- package/dist/{chunk-CAQYQA4R.js → chunk-RSHMZ3LG.js} +15 -1
- package/dist/{client-FCMK3XEK.js → client-2UJ63MVQ.js} +3 -3
- package/dist/{config-64G36TJL.js → config-NCUGK6NS.js} +3 -3
- package/dist/index.js +2549 -29
- package/dist/{model-EZ6K7FXI.js → model-SJSOZTRS.js} +5 -7
- package/dist/{raw-VEF3D6UD.js → raw-7NVWSVJP.js} +4 -4
- package/dist/{sync-NRODEVNH.js → sync-GRVO4K3U.js} +120 -23
- package/dist/{te-agent-7U7JLJKU.js → te-agent-KZRIEN4N.js} +468 -47
- package/dist/{te-analysis-A2OSGHQ4.js → te-analysis-VAR4KUOK.js} +145 -28
- package/dist/{te-audience-LI67PPGO.js → te-audience-KMKYI2YJ.js} +23 -14
- package/dist/{te-common-35WVU3C5.js → te-common-WNCZB7R7.js} +5 -4
- package/dist/{te-community-LEAP6PWT.js → te-community-JEEFXPB3.js} +11 -10
- package/dist/{te-dataops-N2LGZBOX.js → te-dataops-GD3XBYCS.js} +33 -32
- package/dist/{te-engage-H7C72Z46.js → te-engage-4XHCTS6I.js} +5 -4
- package/dist/{te-kb-I2OKTBAI.js → te-kb-B62KFP2A.js} +97 -7
- package/dist/{te-meta-HBTIEDRO.js → te-meta-EPZGQN56.js} +10 -9
- package/dist/{te-team-EM5OWRQL.js → te-team-YY24VORI.js} +16 -12
- package/dist/tracking/i18n/resources/cli/en.json +153 -0
- package/dist/tracking/i18n/resources/cli/ja.json +153 -0
- package/dist/tracking/i18n/resources/cli/ko.json +153 -0
- package/dist/tracking/i18n/resources/cli/zh.json +153 -0
- package/package.json +9 -3
- package/skills/ae-agent/SKILL.md +66 -26
- package/skills/ae-analysis/SKILL.md +108 -8
- package/skills/ae-analysis/references/cancel_query.md +39 -0
- package/skills/ae-analysis/references/drilldown_user_events.md +4 -2
- package/skills/ae-analysis/references/drilldown_users.md +4 -2
- package/skills/ae-analysis/references/get_bi_panel_detail.md +35 -0
- package/skills/ae-analysis/references/list_alerts.md +1 -1
- package/skills/ae-analysis/references/list_bi_panels.md +35 -0
- package/skills/ae-analysis/references/list_cluster_members.md +4 -1
- package/skills/ae-analysis/references/list_dashboards.md +1 -1
- package/skills/ae-analysis/references/list_entities.md +1 -1
- package/skills/ae-analysis/references/list_events.md +1 -1
- package/skills/ae-analysis/references/list_metrics.md +1 -1
- package/skills/ae-analysis/references/list_project_mark_times.md +1 -1
- package/skills/ae-analysis/references/list_properties.md +1 -1
- package/skills/ae-analysis/references/list_public_access_links.md +1 -1
- package/skills/ae-analysis/references/list_reports.md +1 -1
- package/skills/ae-analysis/references/list_tag_members.md +4 -1
- package/skills/ae-analysis/references/query_adhoc.md +6 -5
- package/skills/ae-analysis/references/query_bi_panel_data.md +58 -0
- package/skills/ae-analysis/references/query_dashboard_report_data.md +4 -1
- package/skills/ae-analysis/references/query_entity_details.md +5 -2
- package/skills/ae-analysis/references/query_event_details.md +4 -1
- package/skills/ae-analysis/references/query_report_data.md +2 -2
- package/skills/ae-analysis-global/SKILL.md +3 -1
- package/skills/ae-analysis-intent/SKILL.md +132 -0
- package/skills/ae-data-integration-helper/SKILL.md +242 -0
- package/skills/ae-data-integration-helper/references/android_sdk_faq.md +179 -0
- package/skills/ae-data-integration-helper/references/c_sdk_compilation.md +83 -0
- package/skills/ae-data-integration-helper/references/c_sdk_faq.md +416 -0
- package/skills/ae-data-integration-helper/references/cocoscreator_sdk_faq.md +123 -0
- package/skills/ae-data-integration-helper/references/cpp_server_sdk_faq.md +365 -0
- package/skills/ae-data-integration-helper/references/index.md +56 -0
- package/skills/ae-data-integration-helper/references/ios_sdk_faq.md +118 -0
- package/skills/ae-data-integration-helper/references/java_sdk_faq.md +406 -0
- package/skills/ae-data-integration-helper/references/javascript_sdk_faq.md +129 -0
- package/skills/ae-data-integration-helper/references/logbus2_guide.md +309 -0
- package/skills/ae-data-integration-helper/references/logbus2_parser_plugin.md +348 -0
- package/skills/ae-data-integration-helper/references/minigame_sdk_faq.md +115 -0
- package/skills/ae-data-integration-helper/references/miniprogram_sdk_faq.md +118 -0
- package/skills/ae-data-integration-helper/references/python_sdk_faq.md +232 -0
- package/skills/ae-data-integration-helper/references/restful_api_notes.md +74 -0
- package/skills/ae-data-integration-helper/references/sdk_log_guide.md +316 -0
- package/skills/ae-data-integration-helper/references/sdk_usage_notes.md +107 -0
- package/skills/ae-data-integration-helper/references/unity_sdk_faq.md +115 -0
- package/skills/ae-generate-tracking-code/SKILL.md +629 -0
- package/skills/ae-generate-tracking-code/references/autotrack-enum.md +183 -0
- package/skills/ae-generate-tracking-code/references/client-sdk-insert.md +202 -0
- package/skills/ae-generate-tracking-code/references/datax-config.md +43 -0
- package/skills/ae-generate-tracking-code/references/debug-script.md +102 -0
- package/skills/ae-generate-tracking-code/references/logbus-config.md +200 -0
- package/skills/ae-generate-tracking-code/references/modes.md +83 -0
- package/skills/ae-generate-tracking-code/references/restful-call.md +36 -0
- package/skills/ae-generate-tracking-code/references/sdk-index.md +128 -0
- package/skills/ae-generate-tracking-code/references/server-sdk-insert.md +206 -0
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +394 -0
- package/skills/ae-generate-tracking-code/references/te-api.md +181 -0
- package/skills/ae-generate-tracking-plan/SKILL.md +1083 -0
- package/skills/ae-generate-tracking-plan/references/autotrack-events.md +273 -0
- package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +425 -0
- package/skills/ae-generate-tracking-plan/references/te-api.md +100 -0
- package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +152 -0
- package/skills/ae-kb/SKILL.md +38 -5
- package/tracking-plan-template/MMO/346/211/213/346/270/270/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +104 -0
- package/tracking-plan-template/MMO/346/211/213/346/270/270/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template/MMO/351/241/265/346/270/270/345/237/213/347/202/271/346/250/241/346/235/277_v2.md +117 -0
- package/tracking-plan-template/MMO/351/241/265/346/270/270/345/237/213/347/202/271/346/250/241/346/235/277_v2.xlsx +0 -0
- package/tracking-plan-template/RPG/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +72 -0
- package/tracking-plan-template/RPG/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template/SLG/346/270/270/346/210/217/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +86 -0
- package/tracking-plan-template/SLG/346/270/270/346/210/217/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template/Slots/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +80 -0
- package/tracking-plan-template/Slots/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template/TE /345/237/213/347/202/271/347/244/272/344/276/213/346/250/241/346/235/277.md" +40 -0
- package/tracking-plan-template/TE /345/237/213/347/202/271/347/244/272/344/276/213/346/250/241/346/235/277.xlsx +0 -0
- package/tracking-plan-template/TE/345/256/230/346/226/271/346/250/241/346/235/277_dataTrackSample.md +40 -0
- package/tracking-plan-template/TE/345/256/230/346/226/271/346/250/241/346/235/277_dataTrackSample.xlsx +0 -0
- package/tracking-plan-template//344/274/221/351/227/262/345/205/273/346/210/220/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v2.md +92 -0
- package/tracking-plan-template//344/274/221/351/227/262/345/205/273/346/210/220/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v2.xlsx +0 -0
- package/tracking-plan-template//345/215/241/347/211/214/346/270/270/346/210/217/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +119 -0
- package/tracking-plan-template//345/215/241/347/211/214/346/270/270/346/210/217/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template//345/241/224/351/230/262/345/205/273/346/210/220/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_V1.md +130 -0
- package/tracking-plan-template//345/241/224/351/230/262/345/205/273/346/210/220/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_V1.xlsx +0 -0
- package/tracking-plan-template//345/276/256/344/277/241/345/260/217/346/270/270/346/210/217/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +52 -0
- package/tracking-plan-template//345/276/256/344/277/241/345/260/217/346/270/270/346/210/217/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template//346/215/225/351/261/274/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +68 -0
- package/tracking-plan-template//346/215/225/351/261/274/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template//346/224/276/347/275/256/347/261/273/345/215/241/347/211/214/346/270/270/346/210/217_/345/237/213/347/202/271/346/250/241/347/211/210v1.md +108 -0
- package/tracking-plan-template//346/224/276/347/275/256/347/261/273/345/215/241/347/211/214/346/270/270/346/210/217_/345/237/213/347/202/271/346/250/241/347/211/210v1.xlsx +0 -0
- package/tracking-plan-template//346/224/276/347/275/256/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +119 -0
- package/tracking-plan-template//346/224/276/347/275/256/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template//346/243/213/347/211/214/347/261/273/357/274/210/346/226/227/345/234/260/344/270/273/357/274/211/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +63 -0
- package/tracking-plan-template//346/243/213/347/211/214/347/261/273/357/274/210/346/226/227/345/234/260/344/270/273/357/274/211/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template//346/243/213/347/211/214/347/261/273/357/274/210/351/272/273/345/260/206/357/274/211/345/237/213/347/202/271/346/250/241/346/235/277_v2.md +101 -0
- package/tracking-plan-template//346/243/213/347/211/214/347/261/273/357/274/210/351/272/273/345/260/206/357/274/211/345/237/213/347/202/271/346/250/241/346/235/277_v2.xlsx +0 -0
- package/tracking-plan-template//347/224/265/345/225/206/345/237/213/347/202/271/346/226/271/346/241/210/346/250/241/346/235/277_v1.md +84 -0
- package/tracking-plan-template//347/224/265/345/225/206/345/237/213/347/202/271/346/226/271/346/241/210/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template//347/237/255/345/211/247/344/272/247/345/223/201/345/237/213/347/202/271/346/226/271/346/241/210/346/250/241/346/235/277_v1.md +79 -0
- package/tracking-plan-template//347/237/255/345/211/247/344/272/247/345/223/201/345/237/213/347/202/271/346/226/271/346/241/210/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template//347/244/276/344/272/244/350/201/212/345/244/251/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +105 -0
- package/tracking-plan-template//347/244/276/344/272/244/350/201/212/345/244/251/347/261/273/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/tracking-plan-template//351/230/205/350/257/273/347/261/273APP/345/237/213/347/202/271/346/250/241/346/235/277_v1.md +83 -0
- package/tracking-plan-template//351/230/205/350/257/273/347/261/273APP/345/237/213/347/202/271/346/250/241/346/235/277_v1.xlsx +0 -0
- package/wiki/te-docs/index.md +225 -0
- package/wiki/te-docs/raw/advanced-data-type/first-event-check.md +66 -0
- package/wiki/te-docs/raw/advanced-data-type/updated-event.md +87 -0
- package/wiki/te-docs/raw/advanced-data-type.md +16 -0
- package/wiki/te-docs/raw/data-ingestion-guide/about-gdpr.md +55 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android/android-advanced/automatic-event-tracking.md +431 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android/android-advanced/debugging-and-logging.md +49 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android/android-advanced/multi-instance.md +66 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android/android-advanced/preset-properties.md +466 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android/android-advanced/third-party-integration.md +127 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android/android-advanced.md +513 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android/compliance.md +24 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android/release-notes.md +177 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/android.md +228 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/c/c-advanced.md +419 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/c/release-notes.md +45 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/c.md +110 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/client-side-sdk-faq.md +52 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cpp/cpp-advanced.md +366 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cpp/release-notes.md +103 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cpp.md +201 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/flutter/compliance.md +26 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/flutter/flutter-advanced/automatically-track-events.md +117 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/flutter/flutter-advanced/debugging-and-logging.md +47 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/flutter/flutter-advanced/preset-properties.md +52 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/flutter/flutter-advanced.md +267 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/flutter/release-notes.md +82 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/flutter.md +139 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/react-native/compliance.md +26 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/react-native/reactnative-advanced/automatically-track-events.md +121 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/react-native/reactnative-advanced/debugging-and-logging.md +54 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/react-native/reactnative-advanced/preset-properties.md +18 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/react-native/reactnative-advanced.md +305 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/react-native/release-notes.md +79 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/react-native.md +137 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/uni-app/release-notes.md +24 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/uni-app/uniapp-advanced/automatically-track-events.md +54 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/uni-app/uniapp-advanced/debugging-and-logging.md +53 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/uni-app/uniapp-advanced/multi-instance.md +42 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/uni-app/uniapp-advanced/preset-properties.md +119 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/uni-app/uniapp-advanced/support-native.md +81 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/uni-app/uniapp-advanced.md +331 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform/uni-app.md +156 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/cross-platform.md +12 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/cocos2d-x-advanced/automatic-event-tracking.md +29 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/cocos2d-x-advanced/debugging-and-logging.md +47 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/cocos2d-x-advanced/multi-instance.md +21 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/cocos2d-x-advanced/preset-properties.md +249 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/cocos2d-x-advanced.md +301 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/compliance.md +24 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x/release-notes.md +51 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocos2d-x.md +281 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/cocoscreator-advance/automatic-event-tracking.md +70 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/cocoscreator-advance/debugging-and-logging.md +57 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/cocoscreator-advance/native-support.md +104 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/cocoscreator-advance/preset-properties.md +91 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/cocoscreator-advance.md +374 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/compliance.md +35 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator/release-notes.md +109 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/cocoscreator.md +170 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/corona/compliance.md +28 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/corona/corona-advanced/automatic-event-tracking.md +29 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/corona/corona-advanced/debugging-and-logging.md +58 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/corona/corona-advanced/preset-properties.md +43 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/corona/corona-advanced.md +204 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/corona/release-notes.md +29 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/corona.md +269 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/compliance.md +24 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/release-notes.md +177 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/unity-advanced/automatic-event-tracking.md +119 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/unity-advanced/debugging-and-logging.md +47 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/unity-advanced/multi-instance.md +50 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/unity-advanced/native-pluggable.md +43 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/unity-advanced/preset-properties.md +212 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/unity-advanced/third-party-integration.md +77 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity/unity-advanced.md +396 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unity.md +176 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal/compliance.md +24 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal/release-notes.md +81 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal/unreal-advanced/automatic-event-tracking.md +79 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal/unreal-advanced/debugging-and-logging.md +31 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal/unreal-advanced/preset-properties.md +25 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal/unreal-advanced/third-party-integrations.md +141 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal/unreal-advanced.md +278 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine/unreal.md +190 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/game-engine.md +14 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/h5-and-app-sdk-connection.md +147 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/instant-app-and-game.md +24 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios/compliance.md +24 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios/ios-advanced/automatic-event-tracking.md +272 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios/ios-advanced/debugging-and-logging.md +77 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios/ios-advanced/multi-instance.md +142 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios/ios-advanced/preset-properties.md +484 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios/ios-advanced/third-party-integrations.md +132 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios/ios-advanced.md +682 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios/release-notes.md +163 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/ios.md +304 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/javascript/compliance.md +29 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/javascript/javascript-advanced/automatic-event-tracking.md +136 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/javascript/javascript-advanced/debugging-and-logging.md +48 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/javascript/javascript-advanced/multi-instance.md +50 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/javascript/javascript-advanced/preset-properties.md +132 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/javascript/javascript-advanced.md +462 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/javascript/release-notes.md +107 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/javascript.md +208 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/macos/macos-advanced/debugging-and-logging.md +62 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/macos/macos-advanced/preset-properties.md +118 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/macos/macos-advanced.md +556 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk/macos.md +231 -0
- package/wiki/te-docs/raw/data-ingestion-guide/client-sdk.md +25 -0
- package/wiki/te-docs/raw/data-ingestion-guide/data-import-tools/filebeat-logstash-user-guide.md +610 -0
- package/wiki/te-docs/raw/data-ingestion-guide/data-import-tools/logbus2-user-guide.md +1215 -0
- package/wiki/te-docs/raw/data-ingestion-guide/data-import-tools/ta-datax-writer-plugin-user-guide.md +278 -0
- package/wiki/te-docs/raw/data-ingestion-guide/data-import-tools.md +15 -0
- package/wiki/te-docs/raw/data-ingestion-guide/privacy-policy.md +38 -0
- package/wiki/te-docs/raw/data-ingestion-guide/restful-api-user-guide.md +155 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced/debugging-and-logging-FM9Cwz.md +37 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced/debugging-and-logging-RSyfw7.md +41 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced/debugging-and-logging.md +89 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced/preset-properties-OxzWw.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced/preset-properties-VuE3wr.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced-IauKwI.md +175 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced-YAilwk.md +210 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/c-advanced.md +211 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/release-notes-PVazwa.md +62 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/release-notes-TADbwY.md +50 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c/release-notes.md +69 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c-V2W3wv.md +131 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c-Zf9Jwl.md +179 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/c.md +189 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/erlang/erlang-advanced/debugging-and-logging.md +38 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/erlang/erlang-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/erlang/erlang-advanced.md +113 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/erlang/release-notes.md +34 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/erlang.md +155 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/golang/golang-advanced/debugging-and-logging.md +42 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/golang/golang-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/golang/golang-advanced.md +157 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/golang/release-notes.md +72 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/golang.md +148 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/java/java-advanced/debugging-and-logging.md +49 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/java/java-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/java/java-advanced.md +223 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/java/release-notes.md +88 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/java.md +174 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/lua/lua-advanced/debugging-and-logging.md +46 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/lua/lua-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/lua/lua-advanced.md +182 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/lua/release-notes.md +61 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/lua.md +121 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/nodejs/nodejs-advanced/debugging-and-logging.md +55 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/nodejs/nodejs-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/nodejs/nodejs-advanced.md +225 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/nodejs/release-notes.md +45 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/nodejs.md +141 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/php/php-advanced/debugging-and-logging.md +41 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/php/php-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/php/php-advanced.md +216 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/php/release-notes.md +45 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/php.md +173 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/python/python-advanced/debugging-and-logging.md +40 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/python/python-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/python/python-advanced.md +206 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/python/release-notes.md +51 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/python.md +116 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/ruby/release-notes.md +44 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/ruby/ruby-advanced/debugging-and-logging.md +47 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/ruby/ruby-advanced/preset-properties.md +126 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/ruby/ruby-advanced.md +189 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk/ruby.md +142 -0
- package/wiki/te-docs/raw/data-ingestion-guide/server-sdk.md +22 -0
- package/wiki/te-docs/raw/data-ingestion-guide/thinkingdata-privacy-policy.md +37 -0
- package/wiki/te-docs/raw/data-ingestion-guide.md +48 -0
- package/wiki/te-docs/raw/preparations-before-data-ingestion/data-rules.md +396 -0
- package/wiki/te-docs/raw/preparations-before-data-ingestion/preset-properties-and-system-fields.md +957 -0
- package/wiki/te-docs/raw/preparations-before-data-ingestion/user-identification-rules.md +723 -0
- package/wiki/te-docs/raw/preparations-before-data-ingestion.md +203 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk/openharmony//345/220/210/350/247/204/346/214/207/345/215/227.md +96 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk/openharmony//346/233/264/346/226/260/346/227/245/345/277/227.md +97 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk/openharmony//350/277/233/351/230/266/346/214/207/345/215/227//345/244/232/345/256/236/344/276/213.md +52 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk/openharmony//350/277/233/351/230/266/346/214/207/345/215/227//345/256/236/346/227/266/350/260/203/350/257/225.md +48 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk/openharmony//350/277/233/351/230/266/346/214/207/345/215/227//351/242/204/347/275/256/345/261/236/346/200/247.md +447 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk/openharmony//350/277/233/351/230/266/346/214/207/345/215/227.md +370 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk/openharmony.md +172 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//345/260/217/347/250/213/345/272/217/345/260/217/346/270/270/346/210/217//345/220/210/350/247/204/346/214/207/345/215/227.md +37 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//345/260/217/347/250/213/345/272/217/345/260/217/346/270/270/346/210/217//346/233/264/346/226/260/346/227/245/345/277/227.md +209 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//345/260/217/347/250/213/345/272/217/345/260/217/346/270/270/346/210/217//350/277/233/351/230/266/346/214/207/345/215/227//345/244/232/345/256/236/344/276/213.md +71 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//345/260/217/347/250/213/345/272/217/345/260/217/346/270/270/346/210/217//350/277/233/351/230/266/346/214/207/345/215/227//345/256/236/346/227/266/350/260/203/350/257/225.md +49 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//345/260/217/347/250/213/345/272/217/345/260/217/346/270/270/346/210/217//350/277/233/351/230/266/346/214/207/345/215/227//350/207/252/345/212/250/351/207/207/351/233/206.md +125 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//345/260/217/347/250/213/345/272/217/345/260/217/346/270/270/346/210/217//350/277/233/351/230/266/346/214/207/345/215/227//351/242/204/347/275/256/345/261/236/346/200/247.md +498 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//345/260/217/347/250/213/345/272/217/345/260/217/346/270/270/346/210/217//350/277/233/351/230/266/346/214/207/345/215/227.md +612 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//345/260/217/347/250/213/345/272/217/345/260/217/346/270/270/346/210/217.md +373 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/cocos2d-lua//345/220/210/350/247/204/346/214/207/345/215/227.md +26 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/cocos2d-lua//346/233/264/346/226/260/346/227/245/345/277/227.md +32 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/cocos2d-lua//350/277/233/351/230/266/346/214/207/345/215/227//345/256/236/346/227/266/350/260/203/350/257/225.md +48 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/cocos2d-lua//350/277/233/351/230/266/346/214/207/345/215/227//350/207/252/345/212/250/351/207/207/351/233/206.md +30 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/cocos2d-lua//350/277/233/351/230/266/346/214/207/345/215/227//351/242/204/347/275/256/345/261/236/346/200/247.md +61 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/cocos2d-lua//350/277/233/351/230/266/346/214/207/345/215/227.md +236 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/cocos2d-lua.md +200 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/egret//346/233/264/346/226/260/346/227/245/345/277/227.md +83 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/egret//350/277/233/351/230/266/346/214/207/345/215/227/native/346/224/257/346/214/201.md +66 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/egret//350/277/233/351/230/266/346/214/207/345/215/227//345/256/236/346/227/266/350/260/203/350/257/225.md +54 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/egret//350/277/233/351/230/266/346/214/207/345/215/227//350/207/252/345/212/250/351/207/207/351/233/206.md +62 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/egret//350/277/233/351/230/266/346/214/207/345/215/227//351/242/204/347/275/256/345/261/236/346/200/247.md +358 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/egret//350/277/233/351/230/266/346/214/207/345/215/227.md +615 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/egret.md +166 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/layaair//346/233/264/346/226/260/346/227/245/345/277/227.md +87 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/layaair//350/277/233/351/230/266/346/214/207/345/215/227/native/346/224/257/346/214/201.md +71 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/layaair//350/277/233/351/230/266/346/214/207/345/215/227//345/256/236/346/227/266/350/260/203/350/257/225.md +54 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/layaair//350/277/233/351/230/266/346/214/207/345/215/227//350/207/252/345/212/250/351/207/207/351/233/206.md +61 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/layaair//350/277/233/351/230/266/346/214/207/345/215/227//351/242/204/347/275/256/345/261/236/346/200/247.md +406 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/layaair//350/277/233/351/230/266/346/214/207/345/215/227.md +597 -0
- package/wiki/te-docs/raw//345/256/242/346/210/267/347/253/257-sdk//346/270/270/346/210/217/345/274/225/346/223/216/layaair.md +179 -0
- package/wiki/te-docs/schema.md +16 -0
- package/wiki/te-docs/synthesis/batch-ingest-comparison.md +324 -0
- package/wiki/te-docs/synthesis/js-sdk-cheatsheet.md +538 -0
- package/wiki/te-docs/synthesis/restful-api-reference.md +363 -0
- package/wiki/te-docs/synthesis/sdk-selection.md +372 -0
- package/wiki/te-docs/synthesis/server-sdk-overview.md +449 -0
- package/dist/chunk-KAEZTSXN.js +0 -99
- package/dist/chunk-OJDNO5QY.js +0 -63
|
@@ -0,0 +1,682 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: ios_sdk_advanced
|
|
3
|
+
name: "iOS-Advanced"
|
|
4
|
+
wikiToken: N4t8wyPNKip6pSkZsZvcYBpMnRc
|
|
5
|
+
parentWikiToken: Wxc7wQj3FitXYVkTuW5cAAtPnCc
|
|
6
|
+
updateTime: 1778673802000
|
|
7
|
+
sourceUrl: https://docs-v2.thinkingdata.cn/?version=v6.0&lan=en-US&code=ios_sdk_advanced
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1**. Managing User Identity**
|
|
11
|
+
SDK instances would use `deviceID_Installs` as the default distinct ID of each user by default, which would be used as the identity identification ID of users under an unlogged-in state. It should be noted that the distinct ID would change after the user reinstalled the App or use the APP with a new device.
|
|
12
|
+
### **1.1. Identify**
|
|
13
|
+
::: tip
|
|
14
|
+
Generally speaking, you do not need to customize a distinct ID. Please ensure that you understand [<text underline="true">User Identification Rules</text>](https://thinkingdata.feishu.cn/wiki/Pov9wECdsi2QQsk4NN9cEPsvnyc) before setting a distinct ID.
|
|
15
|
+
If you need to change the distinct ID, please call the api immediately after SDK is initialized. To avoid the generation of useless accounts, please do not call such a process multiple times.
|
|
16
|
+
:::
|
|
17
|
+
If your App has its own distinct ID management system for each user, you can call `setDistinctId` to set the distinct ID:
|
|
18
|
+
:::: el-tabs
|
|
19
|
+
::: el-tab-pane label=Objective-C
|
|
20
|
+
```objectivec
|
|
21
|
+
// set distinct ID as Thinker
|
|
22
|
+
[TDAnalytics setDistinctId:@"Thinker"];
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
:::
|
|
26
|
+
::: el-tab-pane label=Swift
|
|
27
|
+
```swift
|
|
28
|
+
// set distinct ID as Thinker
|
|
29
|
+
TDAnalytics.setDistinctId("Thinker")
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
:::
|
|
33
|
+
::::
|
|
34
|
+
If you need to get the current distinct ID, please call `getDistinctId`:
|
|
35
|
+
:::: el-tabs
|
|
36
|
+
::: el-tab-pane label=Objective-C
|
|
37
|
+
```objectivec
|
|
38
|
+
//Return distinct ID
|
|
39
|
+
NSString *distinctId = [TDAnalytics getDistinctId];
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
:::
|
|
43
|
+
::: el-tab-pane label=Swift
|
|
44
|
+
```swift
|
|
45
|
+
//Return distinct ID
|
|
46
|
+
let distinctId = TDAnalytics.getDistinctId()
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
:::
|
|
50
|
+
::::
|
|
51
|
+
### **1.2 Login**
|
|
52
|
+
When the users log in, `login` could be called to set the account ID of the user. TE would use the account ID as the identity identification ID, and the account ID that has been set would be saved before `logout` is called. The previous account ID would be covered if `login` is called multiple times.
|
|
53
|
+
:::: el-tabs
|
|
54
|
+
::: el-tab-pane label=Objective-C
|
|
55
|
+
```objectivec
|
|
56
|
+
[TDAnalytics login:@"TD"];
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
:::
|
|
60
|
+
::: el-tab-pane label=Swift
|
|
61
|
+
```swift
|
|
62
|
+
TDAnalytics.login("TD")
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
:::
|
|
66
|
+
::::
|
|
67
|
+
<quote-container>
|
|
68
|
+
**Login events wouldn't be uploaded in this method.**
|
|
69
|
+
</quote-container>
|
|
70
|
+
|
|
71
|
+
### **1.3 Logout**
|
|
72
|
+
After the user logs out, `logout` could be called to eliminate the account ID. The distinct ID would be used as the identity identification ID before the next time `login` is called.
|
|
73
|
+
:::: el-tabs
|
|
74
|
+
::: el-tab-pane label=Objective-C
|
|
75
|
+
```objectivec
|
|
76
|
+
[TDAnalytics logout];
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
:::
|
|
80
|
+
::: el-tab-pane label=Swift
|
|
81
|
+
```swift
|
|
82
|
+
TDAnalytics.logout()
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
:::
|
|
86
|
+
::::
|
|
87
|
+
It is recommended that you call logout upon explicit logout event. For example, call `logout` when the user commits the behavior of canceling an account; do not call such a process when the App is closed.
|
|
88
|
+
<quote-container>
|
|
89
|
+
**Logout events wouldn't be uploaded in this method.**
|
|
90
|
+
</quote-container>
|
|
91
|
+
|
|
92
|
+
## **Sending Events**
|
|
93
|
+
After SDK is initialized, you can track user behaviour data. In general, ordinary events could meet business requirements. You can also use the first/updatable event based on your own service scenario.
|
|
94
|
+
### **2.1 Ordinary Events**
|
|
95
|
+
You can call `track` to upload events. It is suggested that you set event properties based on the data tracking plan drafted previously. Here is an example of a user buying an item:
|
|
96
|
+
:::: el-tabs
|
|
97
|
+
::: el-tab-pane label=Objective-C
|
|
98
|
+
```objectivec
|
|
99
|
+
NSDictionary *eventProperties = @{@"product_name": @"book"};
|
|
100
|
+
[TDAnalytics track:@"product_buy" properties:eventProperties];
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
:::
|
|
104
|
+
::: el-tab-pane label=Swift
|
|
105
|
+
```swift
|
|
106
|
+
let properties = ["product_name": "book"] as [String: Any]
|
|
107
|
+
TDAnalytics.track("product_buy", properties: properties)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
:::
|
|
111
|
+
::::
|
|
112
|
+
### **2.2 First Events**
|
|
113
|
+
The First Event refers to events that would only be recorded once for the ID of a certain device or other dimensions. For example, under certain scenarios, you may want to record the activation event on a certain device. In this case, you can perform data tracking with the first event.
|
|
114
|
+
:::: el-tabs
|
|
115
|
+
::: el-tab-pane label=Objective-C
|
|
116
|
+
```objectivec
|
|
117
|
+
TDFirstEventModel *firstModel = [[TDFirstEventModel alloc] initWithEventName:@"device_activation"];
|
|
118
|
+
firstModel.properties = @{@"key":@"value"};
|
|
119
|
+
[TDAnalytics trackWithEventModel:firstModel];
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
:::
|
|
123
|
+
::: el-tab-pane label=Swift
|
|
124
|
+
```swift
|
|
125
|
+
let firstModel = TDFirstEventModel(eventName:"device_activation")
|
|
126
|
+
firstModel.properties = ["KEY": "VALUE"]
|
|
127
|
+
TDAnalytics.track(with: firstModel)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
:::
|
|
131
|
+
::::
|
|
132
|
+
If you want to judge whether an event is the first event from other dimensions, you can define a first_check_id for the First Event:
|
|
133
|
+
:::: el-tabs
|
|
134
|
+
::: el-tab-pane label=Objective-C
|
|
135
|
+
```csharp
|
|
136
|
+
TDFirstEventModel *firstModel = [[TDFirstEventModel alloc] initWithEventName:@"device_activation" firstCheckID:@"TD"];
|
|
137
|
+
firstModel.properties = @{@"key":@"value"};
|
|
138
|
+
[TDAnalytics trackWithEventModel:firstModel];
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
:::
|
|
142
|
+
::: el-tab-pane label=Swift
|
|
143
|
+
```swift
|
|
144
|
+
let firstModel = TDFirstEventModel(eventName:"device_activation", firstCheckID:"TD")
|
|
145
|
+
firstModel.properties = ["KEY": "VALUE"]
|
|
146
|
+
TDAnalytics.track(with: firstModel)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
:::
|
|
150
|
+
::::
|
|
151
|
+
<quote-container>
|
|
152
|
+
Note: Since the server has to check whether the event is the first event, the first event will be put in storage one hour later by default.
|
|
153
|
+
</quote-container>
|
|
154
|
+
|
|
155
|
+
### **2.3 Updatable Events**
|
|
156
|
+
You can meet the requirements for event data modification under specific scenarios through updatable events. The ID of updatable events should be specified and uploaded when the objects of updatable events are created. TE would determine the data to be updated according to the event name and event ID.
|
|
157
|
+
:::: el-tabs
|
|
158
|
+
::: el-tab-pane label=Objective-C
|
|
159
|
+
```objectivec
|
|
160
|
+
//The event property status is 3 after reporting, with the price being 100
|
|
161
|
+
TDUpdateEventModel *updateModel = [[TDUpdateEventModel alloc] initWithEventName:@"UPDATABLE_EVENT" eventID:@"test_event_id"];
|
|
162
|
+
updateModel.properties = @{@"status": @3, @"price": @100};
|
|
163
|
+
[TDAnalytics trackWithEventModel:updateModel];
|
|
164
|
+
|
|
165
|
+
//The event property status is 5 after reporting, with the price remaining the same
|
|
166
|
+
TDUpdateEventModel *updateModelNew = [[TDUpdateEventModel alloc] initWithEventName:@"UPDATABLE_EVENT" eventID:@"test_event_id"];
|
|
167
|
+
updateModelNew.properties = @{@"status": @5};
|
|
168
|
+
[TDAnalytics trackWithEventModel:updateModelNew];
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
:::
|
|
172
|
+
::: el-tab-pane label=Swift
|
|
173
|
+
```swift
|
|
174
|
+
//The event property status is 3 after reporting, with the price being 100 let updateModel = TDUpdateEventModel(eventName: "UPDATABLE_EVENT", eventID: "test_event_id")
|
|
175
|
+
let updateModel = TDUpdateEventModel(eventName: "UPDATABLE_EVENT", eventID: "test_event_id")
|
|
176
|
+
updateModel.properties = ["status": 3, "price": 100]
|
|
177
|
+
TDAnalytics.track(with: updateModel)
|
|
178
|
+
|
|
179
|
+
//The event property status is 5 after reporting, with the price remaining the same
|
|
180
|
+
let updateModel_new = TDUpdateEventModel(eventName: "UPDATABLE_EVENT", eventID: "test_event_id")
|
|
181
|
+
updateModel_new.properties = ["status": 5]
|
|
182
|
+
TDAnalytics.track(with: updateModel_new)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
:::
|
|
186
|
+
::::
|
|
187
|
+
### **2.4 Overwritable Events**
|
|
188
|
+
Despite the similarity with updatable events, overwritable events would replace all historical data with the latest data. Looking from the perspective of effect, such a process is equivalent to the behavior of deleting the previous data while putting the latest data in storage. TE would determine the data to be updated according to the event name and event ID.
|
|
189
|
+
:::: el-tabs
|
|
190
|
+
::: el-tab-pane label=Objective-C
|
|
191
|
+
```csharp
|
|
192
|
+
// Instance: Assume the event name is OVERWRITE_EVENT when reporting an overwritable event
|
|
193
|
+
//The event property status is 3 after reporting, with the price being 100 TDOverwriteEventModel *overwriteModel = [[TDOverwriteEventModel alloc] initWithEventName:@"OVERWRITE_EVENT" eventID:@"test_event_id"];
|
|
194
|
+
TDOverwriteEventModel *overwriteModel = [[TDOverwriteEventModel alloc] initWithEventName:@"OVERWRITE_EVENT" eventID:@"test_event_id"];
|
|
195
|
+
overwriteModel.properties = @{@"status": @3, @"price": @100};
|
|
196
|
+
[TDAnalytics trackWithEventModel:overwriteModel];
|
|
197
|
+
|
|
198
|
+
//The event property status is 5 after reporting, with the price deleted
|
|
199
|
+
TDOverwriteEventModel *overwriteModel_new = [[TDOverwriteEventModel alloc] initWithEventName:@"OVERWRITE_EVENT" eventID:@"test_event_id"];
|
|
200
|
+
overwriteModel_new.properties = @{@"status": @5};
|
|
201
|
+
[TDAnalytics trackWithEventModel:overwriteModel_new];
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
:::
|
|
205
|
+
::: el-tab-pane label=Swift
|
|
206
|
+
```swift
|
|
207
|
+
// Instance: Assume the event name is OVERWRITE_EVENT when reporting an overwritable event
|
|
208
|
+
//The event property status is 3 after reporting, with the price being 100 TDOverwriteEventModel *overwriteModel = [[TDOverwriteEventModel alloc] initWithEventName:@"OVERWRITE_EVENT" eventID:@"test_event_id"]; let overwriteModel = TDOverwriteEventModel(eventName: "OVERWRITE_EVENT", eventID: "test_event_id")
|
|
209
|
+
let overwriteModel = TDOverwriteEventModel(eventName: "OVERWRITE_EVENT", eventID: "test_event_id")
|
|
210
|
+
overwriteModel.properties = ["status": 3, "price": 100]
|
|
211
|
+
TDAnalytics.track(with: overwriteModel)
|
|
212
|
+
|
|
213
|
+
//The event property status is 5 after reporting, with the price deleted let overwriteModel_new = TDOverwriteEventModel(eventName: "UPDATABLE_EVENT", eventID: "test_event_id")
|
|
214
|
+
let overwriteModel_new = TDOverwriteEventModel(eventName: "UPDATABLE_EVENT", eventID: "test_event_id")
|
|
215
|
+
overwriteModel_new.properties = ["status": 5]
|
|
216
|
+
TDAnalytics.track(with: overwriteModel_new)
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
:::
|
|
220
|
+
::::
|
|
221
|
+
### **2.5 Super Properties**
|
|
222
|
+
Super Properties refer to properties that would be uploaded by each event. Super Properties could be divided into `static super properties` and `dynamic super properties`based on the update frequency. You can select different methods for super property setting according to business requirements; we recommend that you set Super Properties first before sending events. In the same event, when the keys of Super Properties, self-defined event properties, and preset properties are the same, we would assign value according to the following priority: `self-defined properties>dynamic super properties>static super properties>preset properties`.
|
|
223
|
+
#### **2.5.1 Static Super Properties**
|
|
224
|
+
Static Super Properties are properties that all events might have and would change with a low frequency, for example, the user membership class. After setting Static Super Properties through `setSuperProperties`, SDK would use the preset Super Properties as the event properties when tracking events.
|
|
225
|
+
:::: el-tabs
|
|
226
|
+
::: el-tab-pane label=Objective-C
|
|
227
|
+
```objectivec
|
|
228
|
+
[TDAnalytics setSuperProperties:@{@"vip_level": @(2)}];
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
:::
|
|
232
|
+
::: el-tab-pane label=Swift
|
|
233
|
+
```swift
|
|
234
|
+
TDAnalytics.setSuperProperties(["vip_level" : 2])
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
:::
|
|
238
|
+
::::
|
|
239
|
+
Static Super Properties would be saved in local storage, and should not be called every time the App is closed. If such properties already exist, the reset properties would replace the original properties. If such properties do not exist, properties would be newly created. In addition to property setting, we also provide other APIs to set and manage Static Super Properties and meet general business requirements.
|
|
240
|
+
:::: el-tabs
|
|
241
|
+
::: el-tab-pane label=Objective-C
|
|
242
|
+
```objectivec
|
|
243
|
+
//clear a certain super property
|
|
244
|
+
[TDAnalytics unsetSuperProperty:@"isTest"];
|
|
245
|
+
|
|
246
|
+
//clear all certain super properties
|
|
247
|
+
[TDAnalytics clearSuperProperties];
|
|
248
|
+
|
|
249
|
+
//get all certain super properties
|
|
250
|
+
[TDAnalytics getSuperProperties];
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
:::
|
|
254
|
+
::: el-tab-pane label=Swift
|
|
255
|
+
```swift
|
|
256
|
+
//clear a certain super property
|
|
257
|
+
TDAnalytics.unsetSuperProperty("isTest")
|
|
258
|
+
|
|
259
|
+
//clear all certain super properties
|
|
260
|
+
TDAnalytics.clearSuperProperties()
|
|
261
|
+
|
|
262
|
+
//get all certain super properties
|
|
263
|
+
TDAnalytics.getSuperProperties()
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
:::
|
|
267
|
+
::::
|
|
268
|
+
#### **2.5.2 Dynamic Super Properties**
|
|
269
|
+
Dynamic Super Properties that all events might have and would change with a high frequency, for example, the quantity of the gold coins the user possesses. After setting dynamic Super Properties through `setDynamicSuperProperties`, SDK would get the properties during event tracking automatically, and add such properties to the event triggered.
|
|
270
|
+
:::: el-tabs
|
|
271
|
+
::: el-tab-pane label=Objective-C
|
|
272
|
+
```objectivec
|
|
273
|
+
// frequency update of gold coin quantity
|
|
274
|
+
[TDAnalytics setDynamicSuperProperties:^NSDictionary * _Nonnull{
|
|
275
|
+
return @{@"now": [NSDate date]};
|
|
276
|
+
}];
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
:::
|
|
280
|
+
::: el-tab-pane label=Swift
|
|
281
|
+
```swift
|
|
282
|
+
// frequency update of gold coin quantity
|
|
283
|
+
TDAnalytics.setDynamicSuperProperties{ () -> [String : Any] in
|
|
284
|
+
return ["now": Date()]
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
:::
|
|
289
|
+
::::
|
|
290
|
+
### **2.6 Timing Events**
|
|
291
|
+
If you need to record the duration of a certain event, you can call `timeEvent` . Configure the name of the event you want to record. When you upload the event, `#duration` would be added to your event property automatically to record the duration of the event (Unit: second). It should be noted that only one task can be timed with the same event name.
|
|
292
|
+
:::: el-tabs
|
|
293
|
+
::: el-tab-pane label=Objective-C
|
|
294
|
+
```csharp
|
|
295
|
+
//The following instance has recorded the time the user spent on a certain product page
|
|
296
|
+
[TDAnalytics timeEvent:@"stay_shop"];
|
|
297
|
+
/**do someting
|
|
298
|
+
.......
|
|
299
|
+
**/
|
|
300
|
+
//the timing would end when the user leaves the product page. "stay_shop" event would carry#duration, a property representing event duration.
|
|
301
|
+
[TDAnalytics track:@"stay_shop"];
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
:::
|
|
305
|
+
::: el-tab-pane label=Swift
|
|
306
|
+
```swift
|
|
307
|
+
//The following instance has recorded the time the user spent on a certain product page
|
|
308
|
+
TDAnalytics.timeEvent("stay_shop")
|
|
309
|
+
/**do someting
|
|
310
|
+
.......
|
|
311
|
+
**/
|
|
312
|
+
//the timing would end when the user leaves the product page. "stay_shop" event would carry#duration, a property representing event duration.
|
|
313
|
+
TDAnalytics.track("stay_shop")
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
:::
|
|
317
|
+
::::
|
|
318
|
+
## **3. User Properties**
|
|
319
|
+
User property setting APIs supported by TE include: `userSet`, `userSetOnce`, `userAdd`, `userUnset`, `userDelete`, `userAppend`, `userUniqAppend`.
|
|
320
|
+
### 3.1 UserSet
|
|
321
|
+
You can call `userSet` to set general user properties. The original properties would be replaced if the properties uploaded via the API are used. The type of newly-created user properties must conform to that of the uploaded properties. User name setting is taken as the example here:
|
|
322
|
+
:::: el-tabs
|
|
323
|
+
::: el-tab-pane label=Objective-C
|
|
324
|
+
```objectivec
|
|
325
|
+
//the username now is TA
|
|
326
|
+
[TDAnalytics userSet:@{@"username": @"TA"}];
|
|
327
|
+
//the userName now is TE
|
|
328
|
+
[TDAnalytics userSet:@{@"username": @"TE"}];
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
:::
|
|
332
|
+
::: el-tab-pane label=Swift
|
|
333
|
+
```swift
|
|
334
|
+
//the username now is TA
|
|
335
|
+
TDAnalytics.userSet(["usernaame": "TA"])
|
|
336
|
+
//the userName now is TE
|
|
337
|
+
TDAnalytics.userSet(["usernaame": "TE"])
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
:::
|
|
341
|
+
::::
|
|
342
|
+
### 3.2 UserSetOnce
|
|
343
|
+
If the user property you want to upload only needs to be set once, you can call `userSetOnce` to set the property. If such property had been set before, this message would be ignored. Let's take the setting of the first payment time as an example:
|
|
344
|
+
:::: el-tabs
|
|
345
|
+
::: el-tab-pane label=Objective-C
|
|
346
|
+
```objectivec
|
|
347
|
+
//first_payment_time is 2018-01-01 01:23:45.678
|
|
348
|
+
[TDAnalytics userSetOnce:@{@"first_payment_time": @"2018-01-01 01:23:45.678"}];
|
|
349
|
+
//first_payment_time is still 2018-01-01 01:23:45.678
|
|
350
|
+
[TDAnalytics userSetOnce:@{@"first_payment_time": @"2018-12-31 01:23:45.678"}];
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
:::
|
|
354
|
+
::: el-tab-pane label=Swift
|
|
355
|
+
```swift
|
|
356
|
+
//first_payment_time为2018-01-01 01:23:45.678
|
|
357
|
+
TDAnalytics.userSetOnce(["first_payment_time": "2018-01-01 01:23:45.678"])
|
|
358
|
+
//first_payment_time仍然为2018-01-01 01:23:45.678
|
|
359
|
+
TDAnalytics.userSetOnce(["first_payment_time": "2018-12-31 01:23:45.678"])
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
:::
|
|
363
|
+
::::
|
|
364
|
+
### 3.3 UserAdd
|
|
365
|
+
When you want to upload numeric attributes for cumulative operation, you can call `userAdd`.
|
|
366
|
+
If the property has not been set, it would be given a value of 0 before computing. A negative value could be uploaded, which is equivalent to subtraction operation. Let's take the accumulative payment amount as an example:
|
|
367
|
+
:::: el-tabs
|
|
368
|
+
::: el-tab-pane label=Objective-C
|
|
369
|
+
```objectivec
|
|
370
|
+
//in this case, the total_revenue is 30
|
|
371
|
+
[TDAnalytics userAdd:@{@"total_revenue": @30}];
|
|
372
|
+
|
|
373
|
+
//in this case, the total_revenue is 678
|
|
374
|
+
[TDAnalytics userAdd:@{@"total_revenue": @648}];
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
:::
|
|
378
|
+
::: el-tab-pane label=Swift
|
|
379
|
+
```swift
|
|
380
|
+
//in this case, the total_revenue is 30
|
|
381
|
+
TDAnalytics.userAdd(["total_revenue": 30])
|
|
382
|
+
|
|
383
|
+
//in this case, the total_revenue is 678
|
|
384
|
+
TDAnalytics.userAdd(["total_revenue": 648])
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
:::
|
|
388
|
+
::::
|
|
389
|
+
<quote-container>
|
|
390
|
+
The set attribute key is a string, and the Value is only allowed to be a numeric value.
|
|
391
|
+
</quote-container>
|
|
392
|
+
|
|
393
|
+
### 3.4 UserUnset
|
|
394
|
+
When you need to clear the user properties of users, you can call `userUnset` to clear specific properties. `userUnset` would not create properties that have not been created in the cluster.
|
|
395
|
+
:::: el-tabs
|
|
396
|
+
::: el-tab-pane label=Objective-C
|
|
397
|
+
```csharp
|
|
398
|
+
// reset properties of a single user
|
|
399
|
+
[TDAnalytics userUnset:@"key"];
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
:::
|
|
403
|
+
::: el-tab-pane label=Swift
|
|
404
|
+
```swift
|
|
405
|
+
// reset properties of single user
|
|
406
|
+
TDAnalytics.userUnset("key")
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
:::
|
|
410
|
+
::::
|
|
411
|
+
### 3.5 UserDelete
|
|
412
|
+
You can call `userDelete` to delete a user. After deleting the user, you would no longer be able to inquire about its user property, but could still get the events data triggered by the user.
|
|
413
|
+
:::: el-tabs
|
|
414
|
+
::: el-tab-pane label=Objective-C
|
|
415
|
+
```objectivec
|
|
416
|
+
[TDAnalytics userDelete];
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
:::
|
|
420
|
+
::: el-tab-pane label=Swift
|
|
421
|
+
```swift
|
|
422
|
+
TDAnalytics.userDelete()
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
:::
|
|
426
|
+
::::
|
|
427
|
+
### 3.6 UserAppend
|
|
428
|
+
You can call `userAppend` to add user properties of array type.
|
|
429
|
+
:::: el-tabs
|
|
430
|
+
::: el-tab-pane label=Objective-C
|
|
431
|
+
```objectivec
|
|
432
|
+
// list is the value of user property user_list, JSONArray type
|
|
433
|
+
[TDAnalytics userAppend:@{@"product_buy": @[@"apple", @"ball"]}];
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
:::
|
|
437
|
+
::: el-tab-pane label=Swift
|
|
438
|
+
```swift
|
|
439
|
+
TDAnalytics.userAppend(["user_list": ["apple", "ball"]])
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
:::
|
|
443
|
+
::::
|
|
444
|
+
### 3.7 UserUniqAppend
|
|
445
|
+
Since the v2.8.0, you can call `userUniqAppend` to add user properties of array type. You can delete duplicated user property by calling `userUniqAppend` interface. If you call `userAppend` API, duplicated user property might not be deleted.
|
|
446
|
+
|
|
447
|
+
:::: el-tabs
|
|
448
|
+
::: el-tab-pane label=Objective-C
|
|
449
|
+
```objectivec
|
|
450
|
+
// list is the value of user property user_list, NSArray type
|
|
451
|
+
//in this case, the property value of user_list is ["apple","ball"]
|
|
452
|
+
[TDAnalytics userAppend:@{@"user_list":@[@"apple", @"ball"]}];
|
|
453
|
+
//in this case, the property value of user_list is ["apple","apple","ball","cube"]
|
|
454
|
+
[TDAnalytics userAppend:@{@"user_list":@[@"apple", @"cube"]}];
|
|
455
|
+
//in this case, the property value of user_list is ["apple","ball","cube"]
|
|
456
|
+
[TDAnalytics userUniqAppend:@{@"user_list":@[@"apple", @"cube"]}];
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
:::
|
|
460
|
+
::: el-tab-pane label=Swift
|
|
461
|
+
```swift
|
|
462
|
+
// list is the value of user property user_list, Array type
|
|
463
|
+
// in this case, the property value of user_list is ["apple","ball"]
|
|
464
|
+
TDAnalytics.userAppend(["user_list": ["apple", "ball"]])
|
|
465
|
+
//in this case, the property value of user_list is ["apple","apple","ball","cube"]
|
|
466
|
+
TDAnalytics.userAppend(["user_list": ["apple", "cube"]])
|
|
467
|
+
//in this case, the property value of user_list is ["apple","ball","cube"]
|
|
468
|
+
TDAnalytics.userUniqAppend(["user_list": ["apple", "cube"]])
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
:::
|
|
472
|
+
::::
|
|
473
|
+
## **4. Encryption**
|
|
474
|
+
Since v2.8.0, The SDK supports data encryption using AES+RSA. The data encryption function requires the cooperation of the client and the server. For specific usage methods, please consult customer success manager.
|
|
475
|
+
```objectivec
|
|
476
|
+
TDConfig *sdkConfig = [[TDConfig alloc] initWithAppId:appid serverUrl:url];
|
|
477
|
+
NSString *publicKey = @"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCzA......QIDAQAB";
|
|
478
|
+
//set public key information
|
|
479
|
+
[sdkConfig enableEncryptWithVersion:1 publicKey:publicKey];
|
|
480
|
+
[TDAnalytics startAnalyticsWithConfig:sdkConfig];
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
## **5. Enable ****H5**** Connection **
|
|
484
|
+
If you need to connect with the JavaScript SDK that tracks the data of H5, please call the following API when initializing `WebView`. For detailed information, please refer to [<text underline="true">H5 and APP SDK Connection</text>](https://thinkingdata.feishu.cn/wiki/FOFZwGHJii1Jm2ke88DcFrrJnUb)
|
|
485
|
+
:::: el-tabs
|
|
486
|
+
::: el-tab-pane label=Objective-C
|
|
487
|
+
```objectivec
|
|
488
|
+
// connect with H5
|
|
489
|
+
WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
|
|
490
|
+
config.applicationNameForUserAgent = [NSString stringWithFormat:@"%@ %@", config.applicationNameForUserAgent ?: @"", @"/td-sdk-ios"];
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
:::
|
|
494
|
+
::: el-tab-pane label=Swift
|
|
495
|
+
```swift
|
|
496
|
+
// connect with H5
|
|
497
|
+
let webViewConfig = WKWebViewConfiguration()
|
|
498
|
+
webViewConfig.applicationNameForUserAgent = "\(webViewConfig.applicationNameForUserAgent ?? "") /td-sdk-ios"
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
:::
|
|
502
|
+
::::
|
|
503
|
+
## **6. Other**
|
|
504
|
+
### **6.1 ****Device ID**
|
|
505
|
+
You can call `getDeviceId` to get the device ID:
|
|
506
|
+
```objectivec
|
|
507
|
+
[TDAnalytics getDeviceId];
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
### **6.2 Default Timezone**
|
|
511
|
+
SDK would use the local time as the event time by default. You can also assign a timezone by setting the default timezone API. In this way, the time of all events could be aligned according to the timezone set by you:
|
|
512
|
+
```objectivec
|
|
513
|
+
// get TDConfig instance
|
|
514
|
+
TDConfig *config = [[TDConfig alloc] init];
|
|
515
|
+
// set UTC as the default timezone
|
|
516
|
+
config.defaultTimeZone = [NSTimeZone timeZoneWithName:@"UTC"];
|
|
517
|
+
// initialize SDK
|
|
518
|
+
[TDAnalytics startAnalyticsWithConfig:config];
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
<quote-container>
|
|
522
|
+
The local timezone information of the device would be lost if a specific timezone is used to align event time. If you need to save the local timezone information of the device, please add relevant properties for the event.
|
|
523
|
+
</quote-container>
|
|
524
|
+
|
|
525
|
+
### **6.3 Time Calibration**
|
|
526
|
+
SDK would use local time as the event time by default. If the user modifies the device time manually, analysis would be affected. At this time, time calibration could be performed to ensure the accuracy of event time. We provide two time calibration methods: `timestamp` and `NTP.`
|
|
527
|
+
- You can use the current timestamp got from the server to calibrate the time of SDK. Thereafter, all calling operations not assigned with a specific time would use the calibrated time as the occurrence time, including event data and user property setting.
|
|
528
|
+
:::: el-tabs
|
|
529
|
+
::: el-tab-pane label=Objective-C
|
|
530
|
+
```objectivec
|
|
531
|
+
// 1585633785954 is the current unix time stamp, with the unit being millisecond; the corresponding Beijing time is 2020-03-31 13:49:45
|
|
532
|
+
[TDAnalytics calibrateTime:1585633785954];
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
:::
|
|
536
|
+
::: el-tab-pane label=Swift
|
|
537
|
+
```swift
|
|
538
|
+
// 1585633785954 is the current unix time stamp, with the unit being millisecond; the corresponding Beijing time is 2020-03-31 13:49:45
|
|
539
|
+
TDAnalytics.calibrateTime(1585633785954)
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
:::
|
|
543
|
+
::::
|
|
544
|
+
- You can also set the address of NTP server, after which SDK would try to get the current time from the uploaded NTP server address and calibrate the SDK time. If you failed to get the current return results within the default timeout interval (3s), local time would be used to track data.
|
|
545
|
+
:::: el-tabs
|
|
546
|
+
::: el-tab-pane label=Objective-C
|
|
547
|
+
```objectivec
|
|
548
|
+
//use the NTP service of Apple Inc for time calibration
|
|
549
|
+
[TDAnalytics calibrateTimeWithNtp:@"time.apple.com"];
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
:::
|
|
553
|
+
::: el-tab-pane label=Swift
|
|
554
|
+
```swift
|
|
555
|
+
TDAnalytics.calibrateTime(withNtp: "time.apple.com")
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
:::
|
|
559
|
+
::::
|
|
560
|
+
<quote-container>
|
|
561
|
+
1. Using NTP service for time calibration would create some uncertainties. It is suggested that you use a time stamp for time calibration as the priority
|
|
562
|
+
2. You should select your NTP server address carefully to ensure that the device of the user could get server time rapidly under sound network conditions
|
|
563
|
+
</quote-container>
|
|
564
|
+
|
|
565
|
+
### 6.4 Flush
|
|
566
|
+
You can call the `flush` API to report data to TE immediately .
|
|
567
|
+
:::: el-tabs
|
|
568
|
+
::: el-tab-pane label=Objective-C
|
|
569
|
+
```csharp
|
|
570
|
+
[TDAnalytics flush];
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
:::
|
|
574
|
+
::: el-tab-pane label=Swift
|
|
575
|
+
```swift
|
|
576
|
+
TDAnalytics.flush()
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
:::
|
|
580
|
+
::::
|
|
581
|
+
### 6.5 Region Code
|
|
582
|
+
You can obtain such information through `getLocalRegion` to obtain the region code of the user device.
|
|
583
|
+
:::: el-tabs
|
|
584
|
+
::: el-tab-pane label=Objective-C
|
|
585
|
+
```objectivec
|
|
586
|
+
[TDAnalytics getLocalRegion];
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
:::
|
|
590
|
+
::: el-tab-pane label=Swift
|
|
591
|
+
```swift
|
|
592
|
+
TDAnalytics.getLocalRegion()
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
:::
|
|
596
|
+
::::
|
|
597
|
+
### 6.6 Directly connected IP
|
|
598
|
+
To prevent client data from being reported to the server failed due to DNS hijacking. The SDK could obtains the IP address from the ServerUrl and reports data to the server through the IP address.
|
|
599
|
+
:::: el-tabs
|
|
600
|
+
::: el-tab-pane label=Objective-C
|
|
601
|
+
```objectivec
|
|
602
|
+
NSString *appId = @"appId";
|
|
603
|
+
NSString *serverUrl = @"serverUrl";
|
|
604
|
+
TDConfig *config = [[TDConfig alloc] initWithAppId:appId serverUrl:serverUrl];
|
|
605
|
+
|
|
606
|
+
[config enableDNSServcie:@[TDDNSServiceCloudALi, TDDNSServiceCloudGoogle, TDDNSServiceCloudFlare]];
|
|
607
|
+
|
|
608
|
+
[TDAnalytics startAnalyticsWithConfig:config];
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
:::
|
|
612
|
+
::: el-tab-pane label=Swift
|
|
613
|
+
```swift
|
|
614
|
+
let appid = "app_id";
|
|
615
|
+
let url = "url";
|
|
616
|
+
let config = TDConfig(appId: appid, serverUrl: url)
|
|
617
|
+
|
|
618
|
+
config.enableDNSServcie([.cloudALi, .cloudGoogle, .cloudFlare])
|
|
619
|
+
|
|
620
|
+
TDAnalytics.start(with: config)
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
:::
|
|
624
|
+
::::
|
|
625
|
+
### 6.7 Disable Pulling Configuration Information During Initialization
|
|
626
|
+
Starting from version 3.4.0, if you do not need to pull configuration information during SDK initialization, you can turn this feature off via `disableRConfig`. The specific code is as follows:
|
|
627
|
+
:::: el-tabs
|
|
628
|
+
::: el-tab-pane label=Objective-C
|
|
629
|
+
```objectivec
|
|
630
|
+
#import <ThinkingSDK/ThinkingSDK.h>
|
|
631
|
+
|
|
632
|
+
NSString *appid = @"APPID";
|
|
633
|
+
NSString *url = @"SERVER_URL";
|
|
634
|
+
|
|
635
|
+
TDConfig *config = [[TDConfig alloc] init];
|
|
636
|
+
config.appid = appid;
|
|
637
|
+
config.serverUrl = url;
|
|
638
|
+
config.disableRConfig = true;
|
|
639
|
+
[TDAnalytics startAnalyticsWithConfig:config];
|
|
640
|
+
```
|
|
641
|
+
|
|
642
|
+
:::
|
|
643
|
+
::: el-tab-pane label=Swift
|
|
644
|
+
```swift
|
|
645
|
+
let appid = "APPID";
|
|
646
|
+
let url = "SERVER_URL";
|
|
647
|
+
let config = TDConfig(appId: appid, serverUrl: url)
|
|
648
|
+
config.disableRConfig = true;
|
|
649
|
+
TDAnalytics.start(with: config)
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
:::
|
|
653
|
+
::::
|
|
654
|
+
### 6.8 Configure Backup Reporting Addresses
|
|
655
|
+
Starting from version 3.4.0, if you need to configure multiple reporting addresses, you can do so via `backupUrlList`. The sample code is as follows:
|
|
656
|
+
:::: el-tabs
|
|
657
|
+
::: el-tab-pane label=Objective-C
|
|
658
|
+
```objectivec
|
|
659
|
+
#import <ThinkingSDK/ThinkingSDK.h>
|
|
660
|
+
|
|
661
|
+
NSString *appid = @"APPID";
|
|
662
|
+
NSString *url = @"SERVER_URL";
|
|
663
|
+
|
|
664
|
+
TDConfig *config = [[TDConfig alloc] init];
|
|
665
|
+
config.appid = appid;
|
|
666
|
+
config.serverUrl = url;
|
|
667
|
+
config.backupUrlList = @[@"serverUrl1", @"serverUrl2"];
|
|
668
|
+
[TDAnalytics startAnalyticsWithConfig:config];
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
:::
|
|
672
|
+
::: el-tab-pane label=Swift
|
|
673
|
+
```swift
|
|
674
|
+
let appid = "APPID";
|
|
675
|
+
let url = "SERVER_URL";
|
|
676
|
+
let config = TDConfig(appId: appid, serverUrl: url)
|
|
677
|
+
config.backupUrlList = ["serverUrl1", "serverUrl2"]
|
|
678
|
+
TDAnalytics.start(with: config)
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
:::
|
|
682
|
+
::::
|