Skip to main content
Level 2
March 10, 2026
Question

Overwrite the value in data prep ( Datastream) for an eVar

  • March 10, 2026
  • 3 replies
  • 73 views

Hi All

 

We are facing a challenge in capturing the correct ECID value in one of the custom eVar (v23). But because of the CSP policies on the platform the ECID is not available on the client when the rule  trigger hence name of the data element as a string is being passed like %ECID% in eVar23. To get this fixed and replace %ECID% with an empty string , I am using this expression in data stream as 

iif(content.xdm._experience.analytics.customDimensions.eVars.eVar23 == '%ECID%', '', _experience.analytics.customDimensions.eVars.eVar23)

But still getting the same string (%ECID%) in v23 and causing a failed batch in AEP Dataset.

Any advice or suggestion to get this addressed is appreciated.

 

Thank you.

3 replies

Level 3
March 11, 2026

If you have WEB SDK in place, I always recommend to implement the ECID serverside (for example in data prep), mapping  xdm.identityMap.ECID[0].id to eVar23 should solve the issue. ECID on clientside is very buggy (race conditions and other challenges).

 

user79328Author
Level 2
March 11, 2026

Thanks ​@hegi90. The intent to have it from client side is to make it consistent in eVar23. We have hybrid app also and we are actually taking the ECID from Mobile SDK in analyticscontext and creating a DE for web pages in webview and this data element is pushing value to eVar23.On a couple of platform this value is not available while triggering the rule hence it pass the DE name as string causing failed batches in AEP. To avoid this we wanted fix it in data prep but the mapping shared in the question is not working. We wanted to have a empty string or blank value for the records where we have DE name. Any thoughts?

 

Level 3
March 11, 2026

I think there is no need for this transition in data prep, if you map as I recommended, it should always have a value in evar23. You don’t need to collect the ecid on clientside (if you don’t use it there), it’s enough to set it in dataprep. That should solve the issue entirely. If you want to solve it via dataprep (not necessary), check your path which you are sending. You can test it also within the dataprep UI, you should see in the preview if your transition is working. 

 

Level 3
March 11, 2026

Hi ​@user79328 ,

As ​@hegi90 suggested you can use xdm.identityMap.ECID[0].id  in Data Prep and map it to your eVar23 in your schema field (Assuming you are using Adobe Analytics Experience Event Field Group).

If you just want ECID to be available in Adobe Analytics reporting but not in AEP, you can use processing rule in AA to map a.x.identitymap.ecid.0.id(Context Data) to eVar23 as shown in the below screenshot.

 

Level 2
April 1, 2026

Hi ​@user79328 

 

Instead of trying to 'fix' a broken Data Element in your client-side Tags setup, there is a much cleaner 'Server-Side' way to handle this using the Datastream Mapping.

Since the Adobe Edge Network automatically populates the Identity Map with the ECID, you can map that value directly to your eVar within the Datastream. This bypasses any CSP issues or race conditions occurring on the browser.

The Solution: Data Prep Mapping

  1. Go to your Datastream and click Edit Mapping.
  2. Add a new mapping.
  3. Source Field: Use the standard XDM path for the ECID:
    xdm.identityMap.ECID[0].id
  4. Target Field: Map this to your Analytics eVar path:
    _experience.analytics.customDimensions.eVars.eVar23

Why this is better:

  • Reliability: The ECID is guaranteed to exist at the Edge level once the request hits Adobe's servers.
  • Bypasses CSP: You no longer need a Data Element in Tags to 'capture' the ID from a cookie or global variable, so your CSP won't block the value.
  • Cleaner Data: You can remove the %ECID% Data Element from your Adobe Tags rule entirely, preventing that literal string from ever being sent.

This effectively lets the Adobe Edge Network do the work for you, ensuring eVar23 is always populated with the actual ID!"

 

Please let me know if still not working. I have used and worked.

 

Thanks,

Santosh Kumar

Santosh Kumar | AEP & CJA Expert