Skip to main content
sri_lekhak15166
Aug 31, 2023 5:31 AM UTC
Solved

ECID integration with GA/GTM

Hi everyone,
Currently we have project specific Adobe instance, we want to make sure to pass the OrgID and ECID values to a custom dimension on GA.

Does anyone have an idea on how to implement/configure ECID(experience cloud ID) on google analytics? Is there any custom set-up/extension available on GTM directly

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.
Jennifer_Dungan
Jennifer_DunganAccepted solution
Adobe Champion and Community Advisor
Aug 31, 2023 2:50 PM UTC

The Adobe Satellite object makes this easy.

 

For ECID you can run the following JS command:

 

_satellite.getVisitorId().getMarketingCloudVisitorID()

 

So in GTM, you should just be able to do a custom script:

function(){ return _satellite.getVisitorId().getMarketingCloudVisitorID(); }

 

If you want to get fancy:

function(){ var ecid = ""; try { ecid = _satellite.getVisitorId().getMarketingCloudVisitorID(); catch(e) { ecid = "error getting ecid"; } return ecid; }

 

And for the OrgId, you can run:

_satellite.getVisitorId().marketingCloudOrgID

 

You can build that into a GTM custom script variable the same was as the ECID, then you can just pass those variables into your GA Custom Dimensions.

6 replies

Jennifer_Dungan
Adobe Champion and Community Advisor
Jennifer_DunganAdobe Champion and Community AdvisorAccepted solution
Adobe Champion and Community Advisor
Aug 31, 2023 2:50 PM UTC

The Adobe Satellite object makes this easy.

 

For ECID you can run the following JS command:

 

_satellite.getVisitorId().getMarketingCloudVisitorID()

 

So in GTM, you should just be able to do a custom script:

function(){ return _satellite.getVisitorId().getMarketingCloudVisitorID(); }

 

If you want to get fancy:

function(){ var ecid = ""; try { ecid = _satellite.getVisitorId().getMarketingCloudVisitorID(); catch(e) { ecid = "error getting ecid"; } return ecid; }

 

And for the OrgId, you can run:

_satellite.getVisitorId().marketingCloudOrgID

 

You can build that into a GTM custom script variable the same was as the ECID, then you can just pass those variables into your GA Custom Dimensions.

Translate
sri_lekhak15166
Sep 4, 2023 4:33 AM UTC

Thank you for the suggestion. For this method to work, the launch embed codes need to be present on the website right?

Translate
Jennifer_Dungan
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Sep 5, 2023 4:03 AM UTC

Yes... Launch creates the Satellite Variables.

 

While you could have ECID set using the old JS method way, the only way I can think of to get the ECID in that method would be to extract from your cookies which isn't very reliable... 

 

Are you trying to do this without having Launch?? From your original question, I assumed that you were attempting to create an ID stitching between the two systems.... 

Translate
yuhuisg
Community Advisor
Community Advisor
Sep 1, 2023 2:46 AM UTC

ECID provides its own method for retrieving the ECID value. See https://experienceleague.adobe.com/docs/id-service/using/id-service-api/methods/getmcvid.html?lang=en. Note that this is a callback function, so you will need to code it appropriately in your GTM implementation.

Translate