The update method provides an interface to extend values that will be used this Web SDK instance without overwriting existing settings. For example, using the set operation on the user_id field will replace all existing user IDs on the Web SDK instance with the ones provided whereas update will append the ID to the list.
gsght('update', '{field}', {value})
|
Argument
|
<th style={{ textAlign: "left" }}>
Type
</th>
<th style={{ textAlign: "left" }}>
Example
</th>
<th style={{ textAlign: "left" }}>
Description
</th>
</tr>
|
`{field}`
|
<td style={{ textAlign: "left" }}>
String
</td>
<td style={{ textAlign: "left" }}>
`'user_id'`
</td>
<td style={{ textAlign: "left" }}>
The field that you want to update the value for. See the section below for supported fields
</td>
</tr>
<tr>
<td style={{ textAlign: "left" }}>
`{value}`
</td>
<td style={{ textAlign: "left" }}>
Any
</td>
<td style={{ textAlign: "left" }}>
`true`
</td>
<td style={{ textAlign: "left" }}>
The value to update, supported types and payload vary by field.
</td>
</tr>
Fields
user_id
Updates the user_ids associated with the current instance of the Web SDK. See the set method reference for more details about the user_id field
gsght('update', 'user_id', [UserPayload])