How do you correctly map an Adobe Analytics event to a XDM schema field? | Community
Skip to main content
August 1, 2025
Solved

How do you correctly map an Adobe Analytics event to a XDM schema field?

  • August 1, 2025
  • 3 replies
  • 1079 views

I have an Adobe Analytics Web SDK implementation using the data object and we are working on migrating to CJA. This implementation is accurately sending data to AA but in CJA, my event counts show as 0. My mapped eVars and props work fine but I'm probably just missing something simple with the events. I have tried for example, data.__adobe.analytics.events.event1 mapped to a custom schema field web.webInteraction._test.clicks where that field is set to integer. I have also tried changing web.webInteraction._test.clicks to a "measure" and instead mapping to web.webInteraction._test.clicks.value to mimic the AA ExperienceEvent template but both scenarios result in counts of 0 in CJA. What am I missing?

Best answer by Disco_Cowboy

Meant to follow up on this a while ago but just in case anyone else comes across this issue, the solution ended up being quite simple:

 

Instead of the source field format of:       data.__adobe.analytics.events.event1

Simply use this calculated field format:   aa_get_event_value(data.__adobe.analytics.events,"event1")

 

Doing so won't require you to provide a value of 1 for all of your basic count metrics as this function defaults to 1 if no value is provided. This also allows you to use "integer" for the schema field setting instead of needing "measure". 

 

Here is an example of source field to target field:

 

3 replies

KumarRishii
Level 5
August 2, 2025
You're likely seeing 0 event counts in CJA because CJA requires events to have numeric values,   To fix this i will suggest you to :

 Set events like event1: 1
→Map to a measure field in your XDM schema, e.g., web.webInteraction.clicks.value.
 Ensure the field is defined as a measure in CJA
 Use tools like Adobe Debugger to confirm the XDM payload format.
→Reprocess your CJA data view if you recently updated mappings.

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

I hope the reference above helps resolve your issue. If you’ve found another solution, feel free to share it—your insights could be valuable to others in the community.
August 4, 2025

Thank you, for your input Kumar. I have tried changing my schema so that web.webInteraction._test.clicks is set as a "measure" which auto creates web.webInteraction._test.clicks.id as a string and web.webInteraction._test.clicks.value as a double within that measure object but when I map my datastream from data.__adobe.analytics.events.event1 to web.webInteraction._test.clicks.value I get errors in my dataset such as "Error transforming data for required destination path web.webInteraction._bcbsma.clicks.value. Details: Source data does not contain field events" -- I don't know what I'm missing. 

 

In my payload in Developer Tools, I can see that data.__adobe.analytics.events is equal to "event1" and this sends data to Adobe Analytics accurately. Obviously "event1" is a string but web.webInteraction._test.clicks.value is expecting a number. Is this my issue? I shouldn't have to change my Web SDK implementation of AA. There must be a way to correctly map the Adobe Analytics event numbers to a count based XCDM schema field. I feel like I'm missing something simple.

John_Man
Community Advisor
Community Advisor
August 5, 2025

Hi @disco_cowboy 

 

No event sent to CJA so far or just the mapping to custom schema field not working?

 

If no event was sent, would suggest to start simple on just a page view to make sure the end to end flow is working. Check below to make sure the required fields are populated in the Datastream/Data Prep. Apart from XDM id and timestamp, may also need the ECID as the person ID in CJA.

 

https://experienceleague.adobe.com/en/docs/experience-platform/xdm/classes/experienceevent

 

Thanks,

John

 

August 5, 2025

Pageviews work fine. I can use a CJA Workspace template to see the standard Pages Report for example, and the "Page Views" metric (adobe_reserved_label.web_pageviews) shows up with data as expected. It's mainly just AA custom events that are my issue. Perhaps I am forced to use the XDM Schema format _experience.analytics.event1to100.event1.value if I am already sending data.__adobe.analytics.events equals "event1" etc.?? I would definitely prefer to use a custom schema but I must be missing a step in either case.

John_Man
Community Advisor
Community Advisor
August 5, 2025

Hi @disco_cowboy 

 

Would you mind showing your Data Stream mapping of the concerned field?

 

Thanks,

John

 

Disco_CowboyAuthorAccepted solution
September 17, 2025

Meant to follow up on this a while ago but just in case anyone else comes across this issue, the solution ended up being quite simple:

 

Instead of the source field format of:       data.__adobe.analytics.events.event1

Simply use this calculated field format:   aa_get_event_value(data.__adobe.analytics.events,"event1")

 

Doing so won't require you to provide a value of 1 for all of your basic count metrics as this function defaults to 1 if no value is provided. This also allows you to use "integer" for the schema field setting instead of needing "measure". 

 

Here is an example of source field to target field: