You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Queued signals do not contain a client side timestamp and will be timestamped
76
-
// on the server at the time of arrival. Consider adding a timestamp value to
77
-
// your payloads if you need to be able to correlate them.
78
-
constqueuedEvents= [
79
-
['app', YOUR_APP_ID],
80
-
['user', YOUR_USER_IDENTIFIER],
81
-
['signal'],
82
-
['signal', { route:'some/page/path' }],
83
-
];
84
-
td.ingest(qeuedEvents);
85
-
86
74
// Basic signal
87
75
td.signal();
88
76
89
-
// Update app or user identifier
90
-
td.app(YOUR_NEW_APP_ID);
91
-
td.user(YOUR_NEW_USER_IDENTIFIER);
92
-
93
-
// Signal with custom payload
77
+
// Adanced: Signal with custom payload
94
78
td.signal({
95
79
route:'some/page/path',
96
80
});
81
+
97
82
```
98
83
99
84
Please replace `YOUR_APP_ID` with the app ID you received from TelemetryDeck. If you have any string that identifies your user, such as an email address, use it as `YOUR_USER_IDENTIFIER` – it will be cryptographically anonymized with a hash function.
100
85
101
86
If you want to pass optional parameters to the signal being sent, add them to the optional payload object.
102
87
88
+
You can also update your user identifier or queue events like this:
89
+
90
+
```js
91
+
// Optional: Update app or user identifier
92
+
td.app(YOUR_NEW_APP_ID);
93
+
td.user(YOUR_NEW_USER_IDENTIFIER);
94
+
95
+
// Optional: Process any events that have been qeued up
96
+
// Queued signals do not contain a client side timestamp and will be timestamped
97
+
// on the server at the time of arrival. Consider adding a timestamp value to
98
+
// your payloads if you need to be able to correlate them.
0 commit comments