Skip to content

Segment Plugin Feature Request: Passing options to analytics.load() #506

@sreenath

Description

@sreenath

Currently, the Segment plugin initialisation does not allow users to pass the optional second argument, options to the core analytics.load() function. This limits customisation when loading the Segment library.

We request the addition of a new property, loadOptions within the plugin configuration object. This property should accept the desired options object, which will then be passed directly to analytics.load() alongside the writeKey.

Proposed Implementation Change:

Instead of the current call:

analytics.load(writeKey);

The plugin should be modified to accept and utilize the loadOptions from the plugin configuration:

const { writeKey, loadOptions } = pluginConfig;
analytics.load(writeKey, loadOptions); // Pass loadOptions as the second argument

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions