Skip to main content
New Member
Oct 12, 2022 9:16 AM UTC
Solved

Acquire the Experience Cloud ID using the Web SDK

Hello,

Need to understand recommended way to capture ECID using in evar or a prop in WebSDK implementation.

 

Thanks in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Vijayakumar_Raju_CBEAccepted solution
Level 2
Oct 25, 2022 6:19 AM UTC

Hi @kshama_n,

Simple way to capture the ECID value in to Prop (or) Evar are just enter "D=mid" in respective variables under XDM PageView Data Element.
eVar25:"D=mid"
prop11:"D=mid"

This will automatically captured the ECID and placed into those variables. You can also check in real-time from Adobe Analytics UI after mapped the prop variable.

Thanks,
Vijay

 

4 replies

ChetanyaJain-1
Community Advisor
Community Advisor
Oct 12, 2022 2:02 PM UTC

Hi @kshama_n,

 

I hope this helps! If you have any further questions please let me know.

Translate
Danny-Miller
Adobe Employee
Adobe Employee
Oct 12, 2022 3:09 PM UTC

@kshama_n Have you tried this?

Syntax: var *variable name* = visitor.getMarketingCloudVisitorID()

https://experienceleague.adobe.com/docs/id-service/using/id-service-api/methods/getmcvid.html?lang=en

 

Translate
Anil_Umachigi
Adobe Employee
Adobe Employee
Oct 13, 2022 12:05 AM UTC

@kshama_n You have couple of options 

1.) within your data elements then set it to relevant field

var ecidFromWebSDK
alloy("getIdentity")
    .then(function (result) {
        ecidFromWebSDK = result.identity.ECID;
        // set it to data element ecidWeb
        _satellite.setVar('ecidWeb', ecidFromWebSDK);
    })
    .catch(function (error) {
        // log error when debug enabled
    });

2.) use data prep to map it like so 

 

Translate
Vijayakumar_Raju_CBEAccepted solution
Level 2
Oct 25, 2022 6:19 AM UTC

Hi @kshama_n,

Simple way to capture the ECID value in to Prop (or) Evar are just enter "D=mid" in respective variables under XDM PageView Data Element.
eVar25:"D=mid"
prop11:"D=mid"

This will automatically captured the ECID and placed into those variables. You can also check in real-time from Adobe Analytics UI after mapped the prop variable.

Thanks,
Vijay

 

Translate