Web SDK - Retrieve the ECID through Data Prep for Data Collection | Community
Skip to main content
Best answer by Harveer_SinghGi1

Hi ​@Michael_Soprano ,

Just to make things clear, web sdk calls always have ECID inside identityMap. The documentation you shared talks about method to access the ECID from the identityMap of the event and pass it in any other XDM field of your choice, e.g. a custom field that you created in the schema to collect EXID out of identityMap. If you don’t have such requirement you don’t need to implement it as web sdk will always have ECID inside identityMap on every event.

Now, incase you have a requirement of reading the ECID from the identityMap and pass it to a custom field using the method suggested in the documentation you share, you can start the data prep with an empty JSON object like {} and it will enable to Next button and let you proceed with data prep configuration. One you are in the data prep screen you can simply add xdm.identityMap.ECID[0].id in the source field and map it to target field of your choice.

Cheers!

2 replies

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 1, 2026

Easiest is to look at a web SDK call from your website, copy the request payload from the developer console (right click on the first item in the events array, copy object) and paste it in your JSON input. From there on, you can do the mapping 

Cheers from Switzerland!
Harveer_SinghGi1
Community Advisor and Adobe Champion
Harveer_SinghGi1Community Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 3, 2026

Hi ​@Michael_Soprano ,

Just to make things clear, web sdk calls always have ECID inside identityMap. The documentation you shared talks about method to access the ECID from the identityMap of the event and pass it in any other XDM field of your choice, e.g. a custom field that you created in the schema to collect EXID out of identityMap. If you don’t have such requirement you don’t need to implement it as web sdk will always have ECID inside identityMap on every event.

Now, incase you have a requirement of reading the ECID from the identityMap and pass it to a custom field using the method suggested in the documentation you share, you can start the data prep with an empty JSON object like {} and it will enable to Next button and let you proceed with data prep configuration. One you are in the data prep screen you can simply add xdm.identityMap.ECID[0].id in the source field and map it to target field of your choice.

Cheers!