An interface for editing associated custom identifiers.
Example
const editor = sdk.analytics.associatedIdentifiers.edit()
editor.remove("MY_ID").add("THIRD_PARTY_ANALYTICS_ID", "my-analytics-id-123")
await editor.apply()
Methods
add(key, identifier) → {AssociatedIdentifiersEditor}
Queue identifier additions.
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
the identifier's key |
identifier |
string
|
the identifier to associate with the channel |
Returns:
apply() → {Promise.<void>}
Applies any queued changes. Previous associated identifiers will be replaced.
Returns:
-
resolves if changes were applied successfully.
-
- Type:
-
Promise.<void>
clear() → {AssociatedIdentifiersEditor}
Clear all identifiers. Identifiers will be cleared first during apply, then the other operations will be applied.
Returns:
remove(key) → {AssociatedIdentifiersEditor}
Queue identifier removals.
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
the identifier to remove's key |
Returns:
set(identifiers) → {AssociatedIdentifiersEditor}
Queue setting the associated identifiers to the provided identifiers.
Parameters:
Name | Type | Description |
---|---|---|
identifiers |
Array.<AssociatedIdentifier>
|
the array of identifiers |