@thinkingai/ae-cli 1.0.28 → 6.0.16-1
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 +2553 -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,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: javascript_sdk_multi_instance
|
|
3
|
+
name: "Multi-Instance"
|
|
4
|
+
wikiToken: VSPewnQaUiXZFvkfSGNcZdz0nvd
|
|
5
|
+
parentWikiToken: BwkywAk0aiKI9Skyhk8cKnlKnde
|
|
6
|
+
updateTime: 1774249082000
|
|
7
|
+
sourceUrl: https://docs-v2.thinkingdata.cn/?version=v6.0&lan=en-US&code=javascript_sdk_multi_instance
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
You can call `initInstance` to create child instance,Its parameter is the child instance name,You can then call the child instance's API by that name.
|
|
11
|
+
```javascript
|
|
12
|
+
// Create an instance named newInstance
|
|
13
|
+
ta.initInstance("newInstance");
|
|
14
|
+
// set distinct_id for child instance and send the event of test_event
|
|
15
|
+
ta.newInstance.setDistinctId("new_distinct_id");
|
|
16
|
+
ta.newInstance.track("test_event");
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
By default, child instance use the same configuration as the main instance (appId, serverUrl, etc.),and child instance do not enable local caching.
|
|
20
|
+
If you need to configure parameters for child instance separately, you can pass in the configuration information during initialization,and passing in different appId values,then you can reporting data to different projects:
|
|
21
|
+
```javascript
|
|
22
|
+
// configuration parameters for child instance
|
|
23
|
+
var param = {
|
|
24
|
+
appId: "debug-appid",
|
|
25
|
+
serverUrl: "ANOTHER_SERVER_URL",
|
|
26
|
+
persistenceEnabled: true, // enable the local cache of the child instance
|
|
27
|
+
send_method: "image",
|
|
28
|
+
showLog: true
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// init child instance
|
|
32
|
+
ta.initInstance("anotherInstance", param);
|
|
33
|
+
|
|
34
|
+
//upload data to the main instance
|
|
35
|
+
ta.track("Event");
|
|
36
|
+
|
|
37
|
+
//upload data to the child instance
|
|
38
|
+
ta.anotherInstance.track("Event");
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The ID systems and the pulbic properties of the Main-instance and the Child-instance are not interoperable,User ID can be set individually for each instance,The following case uses this feature to report the invitation success and invitation events for the inviter and invitee of the event of inviting friends:
|
|
42
|
+
```javascript
|
|
43
|
+
//The main instance is the new user being invited and the child instance is the inviter
|
|
44
|
+
ta.login("invitee");
|
|
45
|
+
ta.anotherInstance.login("inviter");
|
|
46
|
+
//New user triggers invited event
|
|
47
|
+
ta.track("be_invited");
|
|
48
|
+
//Inviter trigger invite new user event
|
|
49
|
+
ta.anotherInstance.track("invite_new_user");
|
|
50
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: javascript_sdk_preset_properties
|
|
3
|
+
name: "Preset Properties"
|
|
4
|
+
wikiToken: V3ITwtUofi0wCAkhTw5czkIvnqg
|
|
5
|
+
parentWikiToken: BwkywAk0aiKI9Skyhk8cKnlKnde
|
|
6
|
+
updateTime: 1774249080000
|
|
7
|
+
sourceUrl: https://docs-v2.thinkingdata.cn/?version=v6.0&lan=en-US&code=javascript_sdk_preset_properties
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## **1. Preset Properties of All Events**
|
|
11
|
+
All Events in JavaScript SDK(including auto-tracking events) would have the following preset property.
|
|
12
|
+
<sheet token="PNTKsV2bWhwNcjtjMy1c1xSynef_Vt6TIB"/>
|
|
13
|
+
|
|
14
|
+
## **2. Preset Properties of Auto-tracking Event**
|
|
15
|
+
|
|
16
|
+
<lark-table rows="6" cols="4" column-widths="243,243,100,243">
|
|
17
|
+
|
|
18
|
+
<lark-tr>
|
|
19
|
+
<lark-td>
|
|
20
|
+
**Property name**
|
|
21
|
+
</lark-td>
|
|
22
|
+
<lark-td>
|
|
23
|
+
**Display name**
|
|
24
|
+
</lark-td>
|
|
25
|
+
<lark-td>
|
|
26
|
+
**Property type** {align="center"}
|
|
27
|
+
</lark-td>
|
|
28
|
+
<lark-td>
|
|
29
|
+
**Instruction**
|
|
30
|
+
</lark-td>
|
|
31
|
+
</lark-tr>
|
|
32
|
+
<lark-tr>
|
|
33
|
+
<lark-td>
|
|
34
|
+
#url
|
|
35
|
+
</lark-td>
|
|
36
|
+
<lark-td>
|
|
37
|
+
website url
|
|
38
|
+
</lark-td>
|
|
39
|
+
<lark-td>
|
|
40
|
+
Text {align="center"}
|
|
41
|
+
</lark-td>
|
|
42
|
+
<lark-td>
|
|
43
|
+
current URL of website
|
|
44
|
+
</lark-td>
|
|
45
|
+
</lark-tr>
|
|
46
|
+
<lark-tr>
|
|
47
|
+
<lark-td>
|
|
48
|
+
#url_path
|
|
49
|
+
</lark-td>
|
|
50
|
+
<lark-td>
|
|
51
|
+
website path
|
|
52
|
+
</lark-td>
|
|
53
|
+
<lark-td>
|
|
54
|
+
Text {align="center"}
|
|
55
|
+
</lark-td>
|
|
56
|
+
<lark-td>
|
|
57
|
+
current path of website
|
|
58
|
+
</lark-td>
|
|
59
|
+
</lark-tr>
|
|
60
|
+
<lark-tr>
|
|
61
|
+
<lark-td>
|
|
62
|
+
#referrer
|
|
63
|
+
</lark-td>
|
|
64
|
+
<lark-td>
|
|
65
|
+
Forward address
|
|
66
|
+
</lark-td>
|
|
67
|
+
<lark-td>
|
|
68
|
+
Text {align="center"}
|
|
69
|
+
</lark-td>
|
|
70
|
+
<lark-td>
|
|
71
|
+
The address of the website before skipping
|
|
72
|
+
</lark-td>
|
|
73
|
+
</lark-tr>
|
|
74
|
+
<lark-tr>
|
|
75
|
+
<lark-td>
|
|
76
|
+
#referrer_host
|
|
77
|
+
</lark-td>
|
|
78
|
+
<lark-td>
|
|
79
|
+
Forward path
|
|
80
|
+
</lark-td>
|
|
81
|
+
<lark-td>
|
|
82
|
+
Text {align="center"}
|
|
83
|
+
</lark-td>
|
|
84
|
+
<lark-td>
|
|
85
|
+
The path of the website before skipping
|
|
86
|
+
</lark-td>
|
|
87
|
+
</lark-tr>
|
|
88
|
+
<lark-tr>
|
|
89
|
+
<lark-td>
|
|
90
|
+
#title
|
|
91
|
+
</lark-td>
|
|
92
|
+
<lark-td>
|
|
93
|
+
website title
|
|
94
|
+
</lark-td>
|
|
95
|
+
<lark-td>
|
|
96
|
+
Text {align="center"}
|
|
97
|
+
</lark-td>
|
|
98
|
+
<lark-td>
|
|
99
|
+
current title of website
|
|
100
|
+
</lark-td>
|
|
101
|
+
</lark-tr>
|
|
102
|
+
</lark-table>
|
|
103
|
+
|
|
104
|
+
## **3. Getting Preset Properties**
|
|
105
|
+
When some preset properties of the application is required for the server data tracking, this method can be invoked to get the preset properties of the application and then send them to the server.
|
|
106
|
+
```javascript
|
|
107
|
+
//get property objects
|
|
108
|
+
var presetProperties = ta.getPresetProperties();
|
|
109
|
+
|
|
110
|
+
//Preset properties of Event
|
|
111
|
+
var properties = presetProperties.toEventPresetProperties();
|
|
112
|
+
/*
|
|
113
|
+
{
|
|
114
|
+
"#os":"Mac OS X",
|
|
115
|
+
"#screen_width":1920,
|
|
116
|
+
"#screen_height":1080,
|
|
117
|
+
"#browser":"chrome",
|
|
118
|
+
"#browser_version":"91.0.4472.114",
|
|
119
|
+
"#device_id":"17a3858fafd9b4-0693d07132e2d1-34657600-2073600-17a3858fafea9b",
|
|
120
|
+
"#zone_offset":8
|
|
121
|
+
}
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
//get a certain preset properties
|
|
125
|
+
var os = presetProperties.os;//os type, e.g., Android
|
|
126
|
+
var screenWidth = presetProperties.screenWidth;//screen width
|
|
127
|
+
var screenHeight = presetProperties.screenHeight;//screen height
|
|
128
|
+
var browser = presetProperties.browser;//browser type
|
|
129
|
+
var browserVersion = presetProperties.browserVersion;//browser version
|
|
130
|
+
var deviceId = presetProperties.deviceId;//device id
|
|
131
|
+
var zoneOffset = presetProperties.zoneOffset;//timezone offset value
|
|
132
|
+
```
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
---
|
|
2
|
+
code: javascript_sdk_advanced
|
|
3
|
+
name: "JavaScript-Advanced"
|
|
4
|
+
wikiToken: BwkywAk0aiKI9Skyhk8cKnlKnde
|
|
5
|
+
parentWikiToken: HwzHwHeb5iFceqk6Eylcd03UnMh
|
|
6
|
+
updateTime: 1774251968000
|
|
7
|
+
sourceUrl: https://docs-v2.thinkingdata.cn/?version=v6.0&lan=en-US&code=javascript_sdk_advanced
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1**. Managing User Identity**
|
|
11
|
+
SDK instances would use random UUID 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 [User Identification Rules](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 `identify` to set the distinct ID:
|
|
18
|
+
```javascript
|
|
19
|
+
ta.identify("Thinker");
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If you need to get the current distinct ID, please call `getDistinctId`:
|
|
23
|
+
```javascript
|
|
24
|
+
//Return distinct ID
|
|
25
|
+
var distinctId = ta.getDistinctId();
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### **1.2 Login**
|
|
29
|
+
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 replaced if `login` has been called multiple times.
|
|
30
|
+
```javascript
|
|
31
|
+
// The login unique identifier of the user, corresponding to the #account_id in data tracking. #Account_id now is TE
|
|
32
|
+
ta.login("TE");
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
<quote-container>
|
|
36
|
+
**Login events wouldn't be uploaded in this method.**
|
|
37
|
+
</quote-container>
|
|
38
|
+
|
|
39
|
+
### **1.3 Removing Account ID**
|
|
40
|
+
After the user logs out, `logout` could be called to remove the account ID. The distinct ID would be used as the identity identification ID before the next time `login` is called.
|
|
41
|
+
```javascript
|
|
42
|
+
ta.logout();
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
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.
|
|
46
|
+
<quote-container>
|
|
47
|
+
**Logout events wouldn't be uploaded in this method.**
|
|
48
|
+
</quote-container>
|
|
49
|
+
|
|
50
|
+
## **Sending Events**
|
|
51
|
+
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 business requirements.
|
|
52
|
+
### **2.1 Ordinary Events**
|
|
53
|
+
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:
|
|
54
|
+
```javascript
|
|
55
|
+
ta.track(
|
|
56
|
+
"product_buy", //event name
|
|
57
|
+
{ product_name: "product_name"} //event property
|
|
58
|
+
);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### **2.2 First Events**
|
|
62
|
+
The First Events 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.
|
|
63
|
+
```javascript
|
|
64
|
+
ta.trackFirst({
|
|
65
|
+
eventName: "device_activation",
|
|
66
|
+
properties: { key:"value" }
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
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:
|
|
71
|
+
```javascript
|
|
72
|
+
//set the user ID as the first_check_id of the first event to track the first initialization event of the user.
|
|
73
|
+
ta.trackFirst({
|
|
74
|
+
eventName: "account_activation",
|
|
75
|
+
firstCheckId: "TA",
|
|
76
|
+
properties: { key: "value"}
|
|
77
|
+
});
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
<quote-container>
|
|
81
|
+
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.
|
|
82
|
+
</quote-container>
|
|
83
|
+
|
|
84
|
+
### **2.3 Updatable Events**
|
|
85
|
+
You can meet the requirements for event data modification under specific scenarios through Updatable Event. The ID of Updatable Event should be specified and uploaded when the objects of Updatable Event are created. TE would determine the data to be updated according to the event name and event ID.
|
|
86
|
+
```javascript
|
|
87
|
+
//The event property status is 3 after reporting, with the price being 100
|
|
88
|
+
ta.trackUpdate({
|
|
89
|
+
eventName: "UPDATABLE_EVENT",
|
|
90
|
+
properties: { status: 3, price: 100 },
|
|
91
|
+
eventId: "test_event_id"
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
//The event property status is 5 after reporting, with the price remaining the same
|
|
95
|
+
ta.trackUpdate({
|
|
96
|
+
eventName: "UPDATABLE_EVENT",
|
|
97
|
+
properties: { status: 5 },
|
|
98
|
+
eventId: "test_event_id"
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### **2.4 Overwriteable Event****s**
|
|
103
|
+
Despite the similarity with Updatable Event, Overwritable Event 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.
|
|
104
|
+
```javascript
|
|
105
|
+
//The event property status is 3 after reporting, with the price being 100
|
|
106
|
+
ta.trackOverwrite({
|
|
107
|
+
eventName: "OVERWRITE_EVENT",
|
|
108
|
+
properties: { status: 3, price: 100 },
|
|
109
|
+
eventId: "test_event_id"
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
//The event property status is 5 after reporting, with the price deleted
|
|
114
|
+
ta.trackOverwrite({
|
|
115
|
+
eventName: "OVERWRITE_EVENT",
|
|
116
|
+
properties: { status: 5 },
|
|
117
|
+
eventId: "test_event_id"
|
|
118
|
+
});
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### **2.5 Super Properties**
|
|
122
|
+
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.
|
|
123
|
+
Before introducing how to set public properties, you need to understand the characteristics of the three types of public properties, and choose the appropriate type according to actual needs:
|
|
124
|
+
- Static Public Properties: Effective for all pages. The lowest priority, when caching is enabled, it will be cached in localStorage or cookie. Only fixed values can be set.
|
|
125
|
+
- Page Public Properties: effective for the current page, with the highest priority. If the SDK is reinitialized, the page public properties will be cleared. Only fixed values can be set.
|
|
126
|
+
- Dynamic Public Properties: effective for the current page, with a lower priority than page public attributes. After reinitializing the SDK, you need to set dynamic public properties again, and you can set dynamic variables.
|
|
127
|
+
#### **2.5.1 Static Super Properties**
|
|
128
|
+
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.
|
|
129
|
+
```javascript
|
|
130
|
+
// set super properties
|
|
131
|
+
ta.setSuperProperties({ vip_level: 2});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Static Super Properties would be saved in local storage, and should not be called every time the Website is closed. If such properties already exist, the reset properties would replace the original properties. If such properties do not exist, properties would be created. In addition to property setting, we also provide other API to set and manage static super properties and meet general business requirements.
|
|
135
|
+
```javascript
|
|
136
|
+
//obtain all certain super properties
|
|
137
|
+
var superProperties = ta.getSuperProperties();
|
|
138
|
+
// clear a certain super property
|
|
139
|
+
ta.unsetSuperProperty("channel");
|
|
140
|
+
// clear all certain super properties
|
|
141
|
+
ta.clearSuperProperties();
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### **2.5.2 Page Public Properties**
|
|
145
|
+
For some static properties in the page, such as the name or address of a page, you may want to add this property to all events triggered in this page.Static properties like this that need to apply to all events in the page,You can set it with `setPageProperty` ,Note that public properties set with `setPageProperty` are only valid for the current page.
|
|
146
|
+
```javascript
|
|
147
|
+
//Set the page ID as a public property of the page, and all events triggered in this page will have the following properties
|
|
148
|
+
ta.setPageProperty({ page_id: "page10001" });
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
If you want to get the page public properties of the current page, you can call `getPageProperty`
|
|
152
|
+
```javascript
|
|
153
|
+
//Get the page public properties of the current page
|
|
154
|
+
var pageProperty = ta.getPageProperty();
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### **2.5.3 ****Dynamic Super Properties**
|
|
158
|
+
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 `setDynamicSuperPropertiesTracker`, SDK would get the properties in `getDynamicSuperProperties` during event tracking automatically, and add such properties to the event triggered.
|
|
159
|
+
```javascript
|
|
160
|
+
ta.setDynamicSuperProperties(function() {
|
|
161
|
+
var d = new Date();
|
|
162
|
+
d.setHours(10);
|
|
163
|
+
return { date: d };
|
|
164
|
+
});
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### **2.6 Timing Events**
|
|
168
|
+
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.
|
|
169
|
+
```javascript
|
|
170
|
+
//The following instance has recorded the time the user spent on a certain product page
|
|
171
|
+
ta.timeEvent("stay_shop");
|
|
172
|
+
/**do someting
|
|
173
|
+
.......
|
|
174
|
+
**/
|
|
175
|
+
//the timing would end when the user leaves the product page. "stay_shop" event would carry#duration, a property representing event duration.
|
|
176
|
+
ta.track("stay_shop",{product_name:"product_name"});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### **2.7 Send data in batches**
|
|
180
|
+
The SDK version needs to be 1.6.1 or above to support data batch sending
|
|
181
|
+
```javascript
|
|
182
|
+
var config = {
|
|
183
|
+
appId: '2f2d8810817c4cbfb7c38aeb8466615a',
|
|
184
|
+
serverUrl: 'https://receiver-ta-preview.thinkingdata.cn',
|
|
185
|
+
send_method: 'ajax',
|
|
186
|
+
//Enable batch sending, the default is false
|
|
187
|
+
batch:true
|
|
188
|
+
//or
|
|
189
|
+
batch: {
|
|
190
|
+
size: 5,//The maximum value of data to be sent in batches at a time, defaulting to 5 pieces
|
|
191
|
+
interval: 5000,//The interval in milliseconds, send immediately, the default is 5S
|
|
192
|
+
storageLimit:200//The maximum number of data cached locally, the default is 200
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
- batch: Whether to enable data batch sending, if not required, the default value is false
|
|
198
|
+
- size: The maximum value of data sent in batches, the default is 5, the minimum value is 1, and the maximum value is 30
|
|
199
|
+
- interval: sending interval, the default is 6000
|
|
200
|
+
- storageLimit: The maximum number of data cached locally, the default is 200
|
|
201
|
+
Attention:
|
|
202
|
+
1. The batch sending function and the callback function can not be used at the same time. For example, if the track is added with a callback, the callback will not be executed after using the batch sending function.
|
|
203
|
+
2. Batch sending uses ajax to send data by default.
|
|
204
|
+
3. If more than 200 pieces of data have been stored in localStorage, the batch sending function will be disabled. Only these 200 pieces of data will be saved in localStorage, and the newly generated data will be sent using the configuration method. The first-out strategy removes 20 pieces of data each time, and sends data to these 20 pieces of data at the same time.
|
|
205
|
+
4. Only one of app_js_bridge and batch_send can be selected, and batch sending can no longer be used if the connection is enabled.
|
|
206
|
+
5. Use local storage to store.
|
|
207
|
+
6. Send data directly in debug or debugOnly mode.
|
|
208
|
+
## **3. User Properties**
|
|
209
|
+
User property setting APIs supported by TE include: `userSet`,`userSetOnce`,`userAdd`,`userUnset`,`userDel``ete`,`userAppend`,`userUniqAppend`.
|
|
210
|
+
### 3.1 userSet
|
|
211
|
+
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:
|
|
212
|
+
```javascript
|
|
213
|
+
//the username now is TA
|
|
214
|
+
ta.userSet({ username: "TA" });
|
|
215
|
+
//the username now is TE
|
|
216
|
+
ta.userSet({ username: "TE" });
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### 3.2 userSetOnce
|
|
220
|
+
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 neglected. Let's take the setting of the first payment time as an example:
|
|
221
|
+
```javascript
|
|
222
|
+
//first_payment_time is 2018-01-01 01:23:45.678
|
|
223
|
+
ta.userSetOnce({first_payment_time: "2018-01-01 01:23:45.678" });
|
|
224
|
+
//first_payment_time is still 2018-01-01 01:23:45.678
|
|
225
|
+
ta.userSetOnce({first_payment_time: "2018-12-31 01:23:45.678" });
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### 3.3 userAdd
|
|
229
|
+
When you want to upload numeric attributes for cumulative operation, you can call `userAdd`.
|
|
230
|
+
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:
|
|
231
|
+
```javascript
|
|
232
|
+
//in this case, the total_revenue is 30
|
|
233
|
+
ta.userAdd({ total_revenue: 30 });
|
|
234
|
+
//in this case, the total_revenue is 678
|
|
235
|
+
ta.userAdd({ total_revenue: 648 });
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### 3.4 userUnset
|
|
239
|
+
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.
|
|
240
|
+
```javascript
|
|
241
|
+
// reset properties of a single user
|
|
242
|
+
ta.userUnset("userPropertykey");
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### 3.5 userDelete
|
|
246
|
+
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 query the events data triggered by the user.
|
|
247
|
+
```javascript
|
|
248
|
+
ta.userDelete();
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### 3.6 userAppend
|
|
252
|
+
You can call `userAppend` to add user properties of array type.
|
|
253
|
+
```javascript
|
|
254
|
+
ta.userAppend({ user_list: ["apple", "ball"] });
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### 3.7 userUniqAppend
|
|
258
|
+
If you call `userAppend` API, duplicated user property might not be merged.
|
|
259
|
+
```javascript
|
|
260
|
+
//in this case, the property value of user_list is ["apple","ball"]
|
|
261
|
+
ta.userAppend({ user_list: ["apple", "ball"] });
|
|
262
|
+
//in this case, the property value of user_list is ["apple","apple","ball","cube"]
|
|
263
|
+
ta.userAppend({ user_list: ["apple", "cube"] });
|
|
264
|
+
//in this case, the property value of user_list is ["apple","ball","cube"]
|
|
265
|
+
ta.userUniqAppend({ user_list: ["apple", "cube"] });
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## **4. Encryption**
|
|
269
|
+
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.
|
|
270
|
+
```javascript
|
|
271
|
+
var config = {
|
|
272
|
+
appId: "xxx",
|
|
273
|
+
serverUrl: "xxx",
|
|
274
|
+
secretKey: {
|
|
275
|
+
//The encrypted public key can be obtained in the TA management background
|
|
276
|
+
publicKey: '公钥',
|
|
277
|
+
//public key version number
|
|
278
|
+
version: 1
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
<quote-container>
|
|
284
|
+
Support data encryption, need to introduce additional crypto-js and jsencrypt
|
|
285
|
+
</quote-container>
|
|
286
|
+
|
|
287
|
+
```javascript
|
|
288
|
+
<script src="https://cdn.bootcdn.net/ajax/libs/crypto-js/4.1.1/crypto-js.js"></script>
|
|
289
|
+
<script src="https://cdn.bootcss.com/jsencrypt/3.2.1/jsencrypt.js"></script>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Connecting Multiple Domain Names
|
|
293
|
+
SDK can unify user behavior on websites with two different domain names, and it allows you to more effectively observe the conversion process of users on related websites.
|
|
294
|
+
```javascript
|
|
295
|
+
ta.quick('siteLinker', {
|
|
296
|
+
linker: [
|
|
297
|
+
{ part_url: 'thinkingdata.cn', after_hash: true },
|
|
298
|
+
{ part_url: 'example.com', after_hash: true }
|
|
299
|
+
]
|
|
300
|
+
})
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
part_url : The configured part_url string must be a substring of the URL to open the URL.
|
|
304
|
+
|
|
305
|
+
<lark-table rows="2" cols="4" column-widths="131,176,203,219">
|
|
306
|
+
|
|
307
|
+
<lark-tr>
|
|
308
|
+
<lark-td>
|
|
309
|
+
The domain you want to open
|
|
310
|
+
</lark-td>
|
|
311
|
+
<lark-td>
|
|
312
|
+
configuration
|
|
313
|
+
</lark-td>
|
|
314
|
+
<lark-td>
|
|
315
|
+
a tag href address
|
|
316
|
+
</lark-td>
|
|
317
|
+
<lark-td>
|
|
318
|
+
a label to get through the results
|
|
319
|
+
</lark-td>
|
|
320
|
+
</lark-tr>
|
|
321
|
+
<lark-tr>
|
|
322
|
+
<lark-td>
|
|
323
|
+
thinkingdata.cn
|
|
324
|
+
</lark-td>
|
|
325
|
+
<lark-td>
|
|
326
|
+
{ part_url: 'thinkingdata.cn', after_hash: false }
|
|
327
|
+
</lark-td>
|
|
328
|
+
<lark-td>
|
|
329
|
+
https://thinkingdata.cn/
|
|
330
|
+
</lark-td>
|
|
331
|
+
<lark-td>
|
|
332
|
+
https://thinkingdata.cn/?_tasdk='d'+distinctID
|
|
333
|
+
</lark-td>
|
|
334
|
+
</lark-tr>
|
|
335
|
+
</lark-table>
|
|
336
|
+
|
|
337
|
+
after_hash: Mandatory attribute, and the attribute value must be Boolean type, namely true or false, configure the _tasdk parameter in the hash part of the URL (that is, the part after #) or in the search part of the URL (that is, the part before # ?)
|
|
338
|
+
|
|
339
|
+
<lark-table rows="9" cols="3" column-widths="245,108,381">
|
|
340
|
+
|
|
341
|
+
<lark-tr>
|
|
342
|
+
<lark-td>
|
|
343
|
+
url
|
|
344
|
+
</lark-td>
|
|
345
|
+
<lark-td>
|
|
346
|
+
after_hash
|
|
347
|
+
</lark-td>
|
|
348
|
+
<lark-td>
|
|
349
|
+
result
|
|
350
|
+
</lark-td>
|
|
351
|
+
</lark-tr>
|
|
352
|
+
<lark-tr>
|
|
353
|
+
<lark-td rowspan="2">
|
|
354
|
+
https://thinkingdata.cn
|
|
355
|
+
</lark-td>
|
|
356
|
+
<lark-td>
|
|
357
|
+
false {align="center"}
|
|
358
|
+
</lark-td>
|
|
359
|
+
<lark-td>
|
|
360
|
+
https://thinkingdata.cn?_tasdk=distinctID
|
|
361
|
+
</lark-td>
|
|
362
|
+
</lark-tr>
|
|
363
|
+
<lark-tr>
|
|
364
|
+
<lark-td>
|
|
365
|
+
true {align="center"}
|
|
366
|
+
</lark-td>
|
|
367
|
+
<lark-td>
|
|
368
|
+
https://thinkingdata.cn#?_tasdk=distinctID
|
|
369
|
+
</lark-td>
|
|
370
|
+
</lark-tr>
|
|
371
|
+
<lark-tr>
|
|
372
|
+
<lark-td rowspan="2">
|
|
373
|
+
https://thinkingdata.cn#index
|
|
374
|
+
</lark-td>
|
|
375
|
+
<lark-td>
|
|
376
|
+
false {align="center"}
|
|
377
|
+
</lark-td>
|
|
378
|
+
<lark-td>
|
|
379
|
+
https://thinkingdata.cn?_tasdk=distinctID#index
|
|
380
|
+
</lark-td>
|
|
381
|
+
</lark-tr>
|
|
382
|
+
<lark-tr>
|
|
383
|
+
<lark-td>
|
|
384
|
+
true {align="center"}
|
|
385
|
+
</lark-td>
|
|
386
|
+
<lark-td>
|
|
387
|
+
https://thinkingdata.cn#index?_tasdk=distinctID
|
|
388
|
+
</lark-td>
|
|
389
|
+
</lark-tr>
|
|
390
|
+
<lark-tr>
|
|
391
|
+
<lark-td rowspan="2">
|
|
392
|
+
https://thinkingdata.cn?a=1#index
|
|
393
|
+
</lark-td>
|
|
394
|
+
<lark-td>
|
|
395
|
+
false {align="center"}
|
|
396
|
+
</lark-td>
|
|
397
|
+
<lark-td>
|
|
398
|
+
https://thinkingdata.cn?a=1&_tasdk=distinctID#index
|
|
399
|
+
</lark-td>
|
|
400
|
+
</lark-tr>
|
|
401
|
+
<lark-tr>
|
|
402
|
+
<lark-td>
|
|
403
|
+
true {align="center"}
|
|
404
|
+
</lark-td>
|
|
405
|
+
<lark-td>
|
|
406
|
+
https://thinkingdata.cn?a=1#index?_tasdk=distinctID
|
|
407
|
+
</lark-td>
|
|
408
|
+
</lark-tr>
|
|
409
|
+
<lark-tr>
|
|
410
|
+
<lark-td rowspan="2">
|
|
411
|
+
https://thinkingdata.cn?a=1#index?b=2 {align="center"}
|
|
412
|
+
</lark-td>
|
|
413
|
+
<lark-td>
|
|
414
|
+
false {align="center"}
|
|
415
|
+
</lark-td>
|
|
416
|
+
<lark-td>
|
|
417
|
+
https://thinkingdata.cn?a=1&_tasdk=distinctID#index?b=2
|
|
418
|
+
</lark-td>
|
|
419
|
+
</lark-tr>
|
|
420
|
+
<lark-tr>
|
|
421
|
+
<lark-td>
|
|
422
|
+
true {align="center"}
|
|
423
|
+
</lark-td>
|
|
424
|
+
<lark-td>
|
|
425
|
+
https://thinkingdata.cn?a=1#index?b=2&_tasdk=distinctID
|
|
426
|
+
</lark-td>
|
|
427
|
+
</lark-tr>
|
|
428
|
+
</lark-table>
|
|
429
|
+
|
|
430
|
+
## **6. Other**
|
|
431
|
+
### **6.1 ****Device ID**
|
|
432
|
+
You can call `getDeviceId` to get the device ID:
|
|
433
|
+
```javascript
|
|
434
|
+
var deviceId = ta.getDeviceId();
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### **6.2 Default Timezone**
|
|
438
|
+
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:
|
|
439
|
+
```javascript
|
|
440
|
+
var config = {
|
|
441
|
+
appId: "xxx",
|
|
442
|
+
serverUrl: "xxx",
|
|
443
|
+
zoneOffset:8
|
|
444
|
+
};
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
<quote-container>
|
|
448
|
+
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.
|
|
449
|
+
</quote-container>
|
|
450
|
+
|
|
451
|
+
### **6.3 Disable the SDK from obtaining configuration information**
|
|
452
|
+
If you do not want the SDK to pull configuration information during initialization, you can control it in the following way:
|
|
453
|
+
```javascript {wrap}
|
|
454
|
+
var config = {
|
|
455
|
+
appId: "xxx",
|
|
456
|
+
serverUrl: "xxx",
|
|
457
|
+
disableRConfig:false
|
|
458
|
+
};
|
|
459
|
+
ta.init(config);
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
Setting `disableRConfig` to `true` means prohibiting the SDK from pulling configuration information, while setting it to `false` means enabling the SDK to pull configuration information.
|