AWS Security ChangesHomeSearch

AWS connect: Document passing custom customerId at ClickStream tracker initialization

Service: connect · 2026-11-05 · Documentation medium

File: connect/latest/adminguide/chat-widget-data-tracker.md · Type: authz

Summary

Replaced the JWT-claims-only guidance with two options for supplying a custom customer identifier: via JWT claims (requires widget security enabled) or by passing the id as a positional string argument to window.amazon_connect.Web.ClickStream.init(). The JWT payload example was removed.

Security assessment

The new initialization path ties clickstream data to a caller-supplied identifier without the previously stated requirement that widget security (JWT signing) be enabled, so identity attribution now depends on client-provided values. This is a security-adjacent documentation change (potential identifier spoofing/misattribution of contact data) rather than a fix for a specific vulnerability.

Evidence

+  * **Via initialization** – Pass the identifier as an argument when initializing the tracker:

Diff

diff --git a/connect/latest/adminguide/chat-widget-data-tracker.md b/connect/latest/adminguide/chat-widget-data-tracker.md
index 663e866..b5e4d0f 100644
--- a//connect/latest/adminguide/chat-widget-data-tracker.md
+++ b//connect/latest/adminguide/chat-widget-data-tracker.md
@@ -207 +207,8 @@ If you don't need to link to an existing profile but want to group clickstream a
-To provide a custom identifier, set the `customerId` field in your JWT claims. You must enable security on your Communications widget before you can use this field. For instructions on enabling security, see [Step 3: Confirm and copy communications widget code and security keys](./add-chat-to-website.html#confirm-and-copy-chat-widget-script).
+There are two ways to provide it:
+
+  * **Via JWT claims** – Set the `customerId` field in your JWT claims (requires security enabled).
+
+  * **Via initialization** – Pass the identifier as an argument when initializing the tracker:
+    
+        // Pass the custom user id as a positional string argument.
+    await window.amazon_connect.Web.ClickStream.init('<custom-user-id>');
@@ -209 +215,0 @@ To provide a custom identifier, set the `customerId` field in your JWT claims. Y
-The following example shows a JWT payload with the `customerId` field:
@@ -212,6 +217,0 @@ The following example shows a JWT payload with the `customerId` field:
-    {
-      "sub": "<widgetId>",
-      "iat": 1234567890,
-      "exp": 1234571490,
-      "customerId": "<custom-user-id>"
-    }