feat(plugin-custom-enrichment): add plugin based on remote config settings#1586
Merged
feat(plugin-custom-enrichment): add plugin based on remote config settings#1586
Conversation
Mercy811
reviewed
Mar 12, 2026
Co-authored-by: Xinyi Ye <xinyi.ye@amplitude.com>
b726191 to
6067ef8
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
This installs the plugin based on remote config's
customEnrichmentsettings. The plugin will install only when explicitly 'enabled' inCustomEnrichmentOptions.Checklist
Note
Medium Risk
Medium risk because it changes SDK initialization and remote-config merging to conditionally install an enrichment plugin, which can affect event payloads and plugin load behavior if misconfigured.
Overview
Adds support for a new
customEnrichmentconfig (and remote-config field) that conditionally installs@amplitude/plugin-custom-enrichment-browserduringAmplitudeBrowser.init().Extends browser config/types to carry
customEnrichment, addsisCustomEnrichmentEnabledgating logic (treating{enabled:false}as off), and updates remote-config joining to applycustomEnrichmentwhen present (ignoringnull). Tests are added for plugin installation and remote-config merge behavior, and the custom-enrichment plugin build now outputs an additional IIFE bundle for snippet-style usage.Written by Cursor Bugbot for commit 24e3dc3. This will update automatically on new commits. Configure here.