Skip to content

Conversation

@sreenath
Copy link

@sreenath sreenath commented Nov 11, 2025

PR to implement #506

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

@sreenath
Copy link
Author

Hey @DavidWells,
Kindly review this at your earliest convenience. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant