I told that if you didn't implemented Marketing Cloud ID, the above solutions wont work.
If you have already implemented, can you pass me the Public URL to validate?
You need to use that in the Global Variables section. So assign:
eVar5="D=mid" (n the eVar section)
prop5="D=mid" (in the prop section)
Customize Page Code section won't help as the script in this section are loaded right before the server call is designed and triggered.
I have implemented Marketing cloud ID service by adding it as a tool in DTM, Then i could see mid on adobe debugger. So now if i assign s.eVar1 = s.prop1 = s.marketingCloudVisitorID in global variables under same property, mid should be populated in that particular evar and sprop report right?
Capturing Marketing Cloud ID in an eVar or Prop is based on the Business Requirement.
For better co-relation and sub-relation, capture it in both.
s.eVar1 = s.prop1 = s.marketingCloudVisitorID;
You should have implemented Marketing Cloud ID before using the above variable.
Marketing Cloud ID is not automatically populated in to Adobe Analytics Report (Through Interface, Workspace and Reportbuilder).
If you want the same to be available in reports, you need to capture the same in a Prop or eVar.