Skip to content

Conversation

@Spencer-Smith
Copy link
Collaborator

Description

Updates media event manager to pass the event itself rather than its xdm only to the function created by injectTimestamp context.

Related Issue

Jira bug report

Motivation and Context

When the oneTimeAnalyticsReferrer context was added, all contexts were updated to pass in the event directly rather than its xdm object; this allows contexts to update other elements of the event (eg the data payload in the case of the Analytics referrer) and to use the functions on the event (eg mergeXdm) rather than replicate their functionality. However, this introduced a regression because the Media Event Manager, which uses a context function to add a timestamp, was not updated to pass the event rather than the xdm to that function. This is the only case in the repo where a context is used outside of the context module and seems to be necessary because these events do not use the event lifecycle.

Screenshots (if appropriate):

N/A

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.
  • TODO: I have added a Changeset (pnpm changeset) or it is not necessary because this PR is not consumer-facing.

@Spencer-Smith Spencer-Smith requested a review from dompuiu January 22, 2026 23:13
@changeset-bot
Copy link

changeset-bot bot commented Jan 22, 2026

🦋 Changeset detected

Latest commit: b0de5a5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@adobe/alloy-core Patch
@adobe/alloy-sandbox-browser Patch

Not sure what this means? Click here to learn what changesets are.

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

@dompuiu
Copy link
Member

dompuiu commented Jan 23, 2026

@Spencer-Smith The fix looks good. But there are some tests failing. Can you take a look?

Copy link
Collaborator

@carterworks carterworks left a comment

Choose a reason for hiding this comment

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

Nice.

Just fix the tests, add a changeset, then we are good to go.

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.

4 participants