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
**Note: this is not recommended unless you really know what you are doing** (like if you have your own system for tracking user devices). Make sure the deviceId you set is sufficiently unique (we recommend something like a UUID - see `src/uuid.js` for an example of how to generate) to prevent conflicts with other devices in our system.
240
240
241
-
### Callbacks for LogEvent, LogRevenue, Identify, SetUserProperties, ClearUserProperties, and How to Redirect ###
242
-
You can pass a callback function to logEvent, identify, setUserProperties, and clearUserProperties, which will get called after receiving a response from the server:
241
+
### Callbacks for LogEvent, Identify, and Redirect ###
242
+
You can pass a callback function to logEventand identify, which will get called after receiving a response from the server:
var identify =newamplitude.Identify().set('key', 'value');
250
+
amplitude.identify(identify, callback_function);
251
+
```
252
+
248
253
The status and response body from the server are passed to the callback function, which you might find useful. An example of a callback function which redirects the browser to another site after a response:
0 commit comments