init
connector.init(fn)
Used to initialize your connector.
Takes a function with an object as a parameter. The object contains the following property:
Parameter | Description |
---|---|
options | Object that contains the configuration values set for options defined using defineOptions in addConnector . |
The function returns an object containing initialization state that you can use throughout your connector.
Note that the returned state object is specific to each connector instance. If a data layer contains multiple instances of your connector, each will run its own connector.init(fn)
lifecycle with the relevant configuration options for that instance and store its own state object.