Skip to content

Conversation

athiramanu
Copy link

@athiramanu athiramanu commented Sep 25, 2025

This change is part of the feature to support Web Experiments in Remote Config. The change is split into 3 PRs where:

  1. Introduces the experiment details in the fetch response type
  2. Extracts experiments received from the fetch response and saves in indexedDB
  3. Sets the experiment and variant received as user property

This is 3/3 mentioned above

Design doc (internal): go/experiments-web

Copy link

changeset-bot bot commented Sep 25, 2025

⚠️ No Changeset found

Latest commit: 27cb4b2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@athiramanu athiramanu changed the title feat: Integrate experiments with firebase analytics internal Integrate experiments with firebase analytics internal Sep 25, 2025
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 25, 2025

Size Report 1

Affected Products

  • @firebase/remote-config

    TypeBase (b3f5fa1)Merge (ddfdb38)Diff
    browser40.8 kB41.2 kB+456 B (+1.1%)
    main42.0 kB42.4 kB+456 B (+1.1%)
    module40.8 kB41.2 kB+456 B (+1.1%)
  • bundle

    TypeBase (b3f5fa1)Merge (ddfdb38)Diff
    remote-config (getAndFetch)60.4 kB60.7 kB+280 B (+0.5%)
  • firebase

    TypeBase (b3f5fa1)Merge (ddfdb38)Diff
    firebase-compat.js810 kB810 kB+241 B (+0.0%)
    firebase-remote-config-compat.js39.6 kB39.9 kB+241 B (+0.6%)
    firebase-remote-config.js44.5 kB44.8 kB+253 B (+0.6%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/YDqQJiB1n0.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 25, 2025

Size Analysis Report 1

This report is too large (2,214,516 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/rtCMmpw7QT.html

@athiramanu athiramanu changed the base branch from web-exp-abt to web-experiment September 26, 2025 01:26
@athiramanu athiramanu marked this pull request as ready for review September 26, 2025 01:27
@athiramanu athiramanu requested review from a team and erikeldridge as code owners September 26, 2025 01:27
experimentId: string,
variantId: string | null
): Promise<void> {
const analytics = await this.analyticsProvider.get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there cases where the provider doesn't return a valid value which we should handle?

const customProperty = {
[experimentId]: variantId
};
analytics.setUserProperties({ properties: customProperty });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this method allow setting multiple user properties in one shot? I'm wondering if it might be a better idea to instead set all properties in one call given each such call would hit their public endpoint over the network?

Maybe we could carve out setUserPropertiesInAnalytics as a separate method where all properties updates could be bundled?

experimentId: string
): Promise<void> {
void this.addExperimentToAnalytics(experimentId, null);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function seems redundant to me. If we're reusing addExperimentToAnalytics, then we could directly call it in removeInactiveExperiments instead.

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.

3 participants