CustomMetaData in Media Analytics with WebSDK | Community
Skip to main content
Level 3
February 25, 2026
Question

CustomMetaData in Media Analytics with WebSDK

  • February 25, 2026
  • 1 reply
  • 6 views

Hi Folks,
 

I am working on the Adobe Analytics implementation migration to Web SDK. My development team is currently implementing it, and we have some questions regarding the XDM object structure for the customMetadata that we send into the media session.

In our current implementation, all the contextVariables that we send with pageview and action calls are also passed into the media session. The common set of Adobe processing rules maps these contextVariables to the analytics variables for both action & pageview calls as well as media analytics session calls.

We have designed the XDM payload schema and would like to follow the same methodology as before: passing the complete XDM payload as customMetadata into the media analytics session. However, the media analytics custom metadata only supports variables of string type, and does not accept objects.

Do you have any recommendations on how this should be handled so that the common set of processing rules can still work for the shared variables across these two different tracking types?

I am aware that a workaround is possible—by flattening the XDM payload and passing customMetadata "variables name" exactly as nested in the schema—but such workarounds are not preferred for a major migration where we expect things to remain aligned.

 

Thanks,
Nitesh

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 25, 2026

HI ​@nitesh__anwani,

 

Are you sending the data to Adobe Analytics or to CJA? Keep in mind that AA only accepts “string” as a final value anyway, so if this is going to AA, then it’s probably less of an issue….

 

If it’s going into CJA, you should be able to set up your own custom field mappings and send the data as an object?? (full disclosure, I am not using Data Streams, and haven’t done this in practice)

Level 3
February 26, 2026

Hi ​@Jennifer_Dungan ,

 

The setup is to collect data in Adobe Analytics; we do not use CJA.

In the current implementation, we heavily rely on context variables and do not directly track props and eVars. For example, the channel context variable is sent in both tracking scenarios:

  • Page view and action calls to the tracking server

  • Media Analytics session tracking

In both cases, channel is passed as a context variable, and a single processing rule maps this context variable to the corresponding prop and eVar in Analytics.

With Web SDK, using the same example, the channel context variable is now passed through the XDM payload as a nested structure, such as:

  • xdm.web.webPageDetails.siteSection, or

  • xdm.sitePageMetaData.channel

In Adobe Analytics, this is mapped as a.x.sitePageMetadata.channel to the corresponding Analytics variables (props and eVars).

To make the same processing rule work for Media Analytics, we need to ensure that the variable is passed in customMetadata using the flattened variable name, for example:

customMetadata["a.x.sitePageMetadata.channel"] = "test_value";

This requires additional flattening of the JSON structure so that each variable is passed individually, rather than sending the full object, before initiating the Media Analytics session.

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 26, 2026

OK, so… this might help you… this only works for AA and not CJA, which is why I wanted to check first….

 

Our mobile app uses Context Variables almost exclusively and when we had to upgrade to the new SDK, I didn’t want to make our developers re-do the entire app…

 

Have you considered using the Adobe Data model in the XDM Stream?? You don’t even need to map the data, it goes straight into AA… so props, eVars and Context Variables….

 

https://experienceleague.adobe.com/en/docs/analytics/implementation/aep-edge/data-var-mapping

 

You can map your context variables in:

data.__adobe.analytics.contextData.channel = "test_value"

 

And this will go straight to Adobe and your processing rules.

 

It’s a lot more straight forward, and a lot less overhead… and as long as this doesn’t have to go to CJA, sounds like a better solution for you.

 

You don’t even need to add any of these Data items into your schema… I just created a schema, and saved it with the few default items that it made with the initial structure.