initialize
Auto-Initialization
By default, this API is being called automatically.
In some cases, there is a need to override settings before the initialization. To achieve that:
- contact the SDK team to stop the auto calling to this API.
- use the API below before any other function of the SDK and wait for it to finish.
// Type:
initialize: (settings?: InitializationSettings) => Promise<void>;
// Example:
const someOverriddenSettings = {
expertise: [ 'overridden-expertise' ]
}
window.AE_SDK(async (thrownError, AE_SDK) => {
await AE_SDK.initialize(someOverriddenSettings);
});
In any case of using the initialize, it must be called and finished before any other API usage.
The function will load the SDK to the page with default initialization settings, merged with the optional given settings as a parameter to the function.
These settings can also be overridden later with appendSettings API.
Parameters
Name | Type | Description | Default |
---|---|---|---|
settings | InitializationSettings | Optional - allows override some default settings |
InitializationSettings
InitializationSettings
is an optional combine of