Skip to content

MWPW-191927 Implementing Config-Based A/B Testing#747

Merged
sanjayms01 merged 5 commits into
stagefrom
MWPW-191927
Apr 27, 2026
Merged

MWPW-191927 Implementing Config-Based A/B Testing#747
sanjayms01 merged 5 commits into
stagefrom
MWPW-191927

Conversation

@sanjayms01
Copy link
Copy Markdown
Collaborator

  • Implementing fetch request to page config API post-LCP
  • Scalable and backwards-compatible approach to fetch experiment data and leverage location header for successive API calls

Resolves: MWPW-191927

Test URLs:

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Apr 19, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Comment thread unitylibs/scripts/utils.js Outdated

export async function fetchPageConfig({ product, verb }) {
try {
const url = `${unityConfig.pageConfigEndPoint}?product=${product}&action=${verb}`;
Copy link
Copy Markdown
Collaborator

@shasmish shasmish Apr 20, 2026

Choose a reason for hiding this comment

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

We renamed the action query param to verb to keep it consistent with other implementation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Got it, have updated accordingly.

const verb = this.workflowCfg.enabledFeatures[0];
try {
const { fetchPageConfig } = await import('../../../scripts/utils.js');
const { default: getExperimentData } = await import('../../../utils/experiment-provider.js');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this be imported when target is enabled?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Since it was required in both if and else conditions, I kept it outside for now. But I agree, it should only be required when target is enabled and will make this change once we can remove the backwards-compatibility.

@sanjayms01 sanjayms01 merged commit dc69e3a into stage Apr 27, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants