Expand my Community achievements bar.

SOLVED

ECID value to be sent to Adobe Analytics

Avatar

Level 2

Hello team,

 

Earlier with appmeasurement, we used to send Adobe analytics the ECID with "D=mid" to one of our eVars.

Now with WebSDK, Adobe recommends we use alloy send if we have to use it on client side:

return alloy("getIdentity")
.then(function(result) {
console.log (result.identity.ECID);
_satellite.setVar("mcid", result.identity.ECID);
});

So i use aboe code, but this code always runs at the last even if the rule has priority 1.

Do you have any other recommendations on how can i send ECID to Adobe Analytics?

 

Thanks,

Nitin

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi @NitinCT 

this is indeed a super unreliable way to use. Please refer to this documentation

https://experienceleague.adobe.com/en/docs/experience-platform/tags/extensions/client/web-sdk/access...

 

and rather do the mapping on your datastream in the Experience Platform.

Don't ask me why Adobe has made this so complicated, but this way I am reliably getting the values in. No need for any client-side requests anymore.

 

bjoern__koth_0-1720785909349.png

 

 

View solution in original post

11 Replies

Avatar

Correct answer by
Level 9

Hi @NitinCT 

this is indeed a super unreliable way to use. Please refer to this documentation

https://experienceleague.adobe.com/en/docs/experience-platform/tags/extensions/client/web-sdk/access...

 

and rather do the mapping on your datastream in the Experience Platform.

Don't ask me why Adobe has made this so complicated, but this way I am reliably getting the values in. No need for any client-side requests anymore.

 

bjoern__koth_0-1720785909349.png

 

 

Avatar

Level 2

hi Bjoern_koth,

 

Thank you so much for reply. And you are right on why Adobe might have made this so much complicated. Typical Adobe.

 

Now when i use Data Prep, i dont see this mapping available for me:

xdm.identitymap.ECID[0].id.

 

I am guessing this would only when i feed this to my Data object on my site. Question is how do i have this available in my data object.

 

If you can share some steps that would be great.

Once all this is done, how do i debug if this value is getting into my XDM object? 

Avatar

Level 9

Hi @NitinCT 

that's the thing, you won't see it. I also did not see it. I just added the JSON from one of my /ee requests and mapped the value to an eVar.

bjoern__koth_0-1720790418949.png

 

Avatar

Level 2

Got it, One last thing, how do i verify that this value is getting assigned to the eVar of my choice? I tried to see it in debugger but i dont see that happening.

Avatar

Level 9

You will have to use the Experience Platform Debugger and/or AEP Assurance for it and check the Edge Transactions.

Theoretically, you will also see this inside of the debugger itself, but this is typically such an overloaded visualization without working filtering which tends to crash, that Assurance might be the easier way...

 

bjoern__koth_0-1720852269119.png

 

bjoern__koth_3-1720852535076.png

 

 

bjoern__koth_2-1720852485956.png

In my case I have set up the mapping for both a prop and eVar

Avatar

Level 2

Hello Bjoern,

 

I didn't a chance to look into this yet, but must be correct. I have however added it at Processing rules level just to be sure not to miss this value.

 

Thanks for your support though.

Avatar

Level 1

Hi @bjoern__koth ,

I have followed the above link and tried setting up the ECID into an eVar from the client side or Tags.

But still I am getting the value as "undefined". In my use case, I have created two library load events(ECID_rule and Page View) separately as per the docs and also tried managing their order of sequence as 50 and 60 respectively.

Could you please add in some thought here, where could be the issue in this case?

 

And if we map these values via Datastreams, so will this appear in every event call(page view, link click or any custom event)?

 

Thanks.

Avatar

Level 2

Hello Bjeoern,

 

One more question, we need to use ecid at client end as well, if we cannot get ecid then can we use "kndctr_CD6843A85593E97F7F000101_AdobeOrg_identity" store this and use it as a sort unique identifier? 

 

Thanks,

Nitin

Avatar

Level 9

Hi @NitinCT 

theoretically yes. It is base64 encoded and seems to have some additional control characters in it. With a regex you should be able to extract it though. To see what I mean, try pasting the value in an online base64 decoder

Avatar

Level 9

Hi @aguseranalytics 

I would go for the mapping solution since the alloy call is asynchronous and hence you get the undefined values. Really annoying. 
or try to decode the value with a base64 decode as mentioned to @NitinCT , but be aware of the control characters in the cookie value.

 

if you don't need the value client-side, rather go with the mapping I'd say