Expand my Community achievements bar.

Webinar: Adobe Customer Journey Analytics Product Innovations: A Quarterly Overview. Come learn for the Adobe Analytics Product team who will be covering AJO reporting, Graph-based Stitching, guided analysis for CJA, and more!
SOLVED

ECID integration with GA/GTM

Avatar

Level 1

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!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

6 Replies

Avatar

Correct answer by
Community Advisor

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.

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

Avatar

Community Advisor

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.... 

Avatar

Level 1

Yeah, let me elaborate. Yes we new have Adobe license purchased but there's no launch integration on the website yet.(plan to integrate in Dec 2023)

 

So was wondering if there's a way to incorporate ECID on GTM without having launch embed codes on site in the meantime to gather audience data for AEP profiling. Thanks!

Avatar

Community Advisor

Ohh.. so you aren't just trying to extract the values in use (to send to your Google), but you are actually trying to implement Adobe (with ECID) in GTM.... That is far more complicated...

 

I would imagine this would have to be done similar to the old school, add the AppMeasurement.js file to the site, and populate all the s objects manually...

 

Honestly, it would be less work and far easier to just add Launch to your website.... 

 

Doing GA tracking from Launch: easy

Doing Adobe tracking from GTM: hard

Avatar

Community Advisor

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=e.... Note that this is a callback function, so you will need to code it appropriately in your GTM implementation.