8000 MWPW-172886 [MEP] Support MEP AICS pzn tags recieved from API REWORKED by ivanvatadobe · Pull Request #4358 · adobecom/milo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MWPW-172886 [MEP] Support MEP AICS pzn tags recieved from API REWORKED #4358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: stage
Choose a base branch
from

Conversation

ivanvatadobe
Copy link
Contributor
@ivanv
10000
atadobe ivanvatadobe commented Jun 10, 2025

This PR adds experience targeting by LOB (Line of Business) to MEP. The new keyword to use in MEP manifests is 'lob-' (example: 'lob-b2b).

This new feature requires an api call via getSpectraLOB() located in utils.js. If the api call promise is not resolved before utils.js calls init() in personalization.js, then the promise will be passed via the entitlements object. The promise will be resolved before hasMatch() is called in personalization.js.

Added features

  • MEP Manifest can now use 'lob-' in experience name column to target user LOB.
  • utils.js has new functions: getCookie() to find ECID required for api call that returns user LOB, and getSpectraLOB() to execute api call to return user LOB.
  • MISC BUG FIX: getSelectedElements() now returns an empty object ({}) instead of null to prevent error when invalid selectors are listed in manifest.

Misc bugfixes

  • personalization.js: getSelectedElements() now returns an empty object ({}) instead of null to prevent error when invalid selectors are listed in manifest.
  • MMM Metadata lookup: On 'Open Slack' button click, link now opens in new window, instead of overtaking the current window.
  • Other one line changes for formatting/shortening lines

Expected behavior/requirements to use

  • Accepted quirk: user LOB (returned via getSpectraLOB()) will not be available on first page hit.
  • This feature requires the targeted page to have page metadata key 'lob' with value of 'on' lob- keyword works with the standard MEP experience name modifiers: ',' '&' 'not'
  • LOB values returned by getSpectraLOB can have - in the value returned, but should not have the string pattern 'lob-' as it would be a MEP keyword duplicate. Example: LOB string returned by getSpectraLOB should be 'b2b' instead of 'lob-b2b'.
  • The feature can be enabled manually via url params: ?lob=on allows getSpectraLOB to run even if the page does not have 'lob:on' in metadata table. Alternatively, user can set ANY lob value manually by using ?lob= (this feature will prevent getSpectraLOB api call from running as this is a direct spoof provided by the user in the url).

Concerns (needs resolution before merging to Main)

  • API endpoint uses stage- in domain. We need confirmation that the URL provided for the API is also intended for production, or if we need to update for production domain.

Resolves: MWPW-174352
PSI check: https://targetbylobrework--milo--adobecom.aem.page/?martech=off

How to test
There's a single page for testing. Depending on the lob spoofed, the marquee headline will change. Make sure to enable mobile device in chrome dev tools if the test case lists Device: Phone.

qa manifest location:
https://main--cc--adobecom.aem.page/drafts/mepdev/fragments/2025/q3/targetbylob/manifest.json

Case 1
note: This is the most important use case as the actual API call is made on this link. The other links are making sure the spoof and MEP modifier works
LOB is not spoofed, confirm LOB is CC after 2nd hit on page
https://main--cc--adobecom.aem.page/drafts/mepdev/fragments/2025/q3/targetbylob/lobmarquee?milolibs=targetbylobrework
Headline on 1st hit (all): ALL experience.
Headline on 2nd hit: LOB-CC -or- LOB-STD on phone

Case 2
LOB is CC
https://main--cc--adobecom.aem.page/drafts/mepdev/fragments/2025/q3/targetbylob/lobmarquee?milolibs=targetbylobrework&lob=cc
Headline: LOB-CC -or- LOB-STD on phone

Case 3
LOB is STD AND Device: Phone
https://main--cc--adobecom.aem.page/drafts/mepdev/fragments/2025/q3/targetbylob/lobmarquee?milolibs=targetbylobrework&lob=std
Headline: LOB-CC -or- LOB-STD on phone

Case 4
LOB is B2B and NOT Device: Phone
https://main--cc--adobecom.aem.page/drafts/mepdev/fragments/2025/q3/targetbylob/lobmarquee?milolibs=targetbylobrework&lob=b2b
Headline: 'LOB-B2B found NOT for phones

Case 5
LOB is B2B and Device: Phone
https://main--cc--adobecom.aem.page/drafts/mepdev/fragments/2025/q3/targetbylob/lobmarquee?milolibs=targetbylobrework&lob=b2b
Headline: LOB-B2B AND Phone

Copy link
Contributor
aem-code-sync bot commented Jun 10, 2025

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

Copy link
Contributor
aem-code-sync bot commented Jun 10, 2025
8000
Page Scores Audits Google
📱 /?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Copy link
Contributor

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR.

@aem-code-sync aem-code-sync bot temporarily deployed to targetbylobrework June 17, 2025 06:14 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to targetbylobrework June 19, 2025 21:20 Inactive
Copy link
Contributor
github-actions bot commented Jul 2, 2025

This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label.

@github-actions github-actions bot added the Stale label Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0