Hi all, I have a tag in our custom implementation, which sets the marketing cloud id . Can someone explain me what happens in case of marketing cloud ids in case of web sd. Thanks
Custom code from the tag is provided below.
var sendAdobePageViewCall = function () {
setTimeout(
function () {
if (
typeof window.AdCloudEvent === "function" &&
typeof this.exec === "function" &&
this.pre &&
this.pre.length
) {
try {
// Forces use of SSL in all cases
window.AppMeasurement.getInstance(window.s.account).ssl = true;
// Persists MID using 'mid' query parameter, cookie or localStorage
var mid =
location.href.match(/mid=([^&\?]+)/i) ||
Bootstrapper.Cookies.get("aa_mid") ||
window.localStorage.getItem("ens_mid") ||
window.localStorage.getItem("marketingCloudVisitorId");
if (mid && mid.length) {
var forcedMid = Array.isArray(mid) ? mid[1] : mid;
window.visitor.setMarketingCloudVisitorID(forcedMid);
}
} catch (e) {}
Bootstrapper.AF.push(["call", "s", "exec"]);
Bootstrapper.FILSPA.initialAdobePageViewFired = true;
setTimeout(window.s.resetCustomActivityMap, 500);
} else Bootstrapper.AF.push(["call", "s", "safelyExec"]);
}.bind(this),
250
);
};
Bootstrapper.AF.push(["set", "s", "safelyExec", sendAdobePageViewCall]);
/*
Triggers the Adobe page view for flat sites *and* SPAs
*/
Bootstrapper.AF.push(["call", "s", "safelyExec"]);
,
Solved! Go to Solution.
Views
Replies
Total Likes
This should be possible using the identityMap in the XDM, providing your custom id as separate namespace.
Afterwards, you can set up the datastream's Analytics configuration to use this separate namespace for the Adobe Analytics VisitorID.
see also
https://experienceleague.adobe.com/en/docs/experience-platform/xdm/field-groups/profile/identitymap
https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/config-vars/visitorid
https://experienceleague.adobe.com/en/docs/experience-platform/datastreams/configure
Views
Replies
Total Likes
This should be possible using the identityMap in the XDM, providing your custom id as separate namespace.
Afterwards, you can set up the datastream's Analytics configuration to use this separate namespace for the Adobe Analytics VisitorID.
see also
https://experienceleague.adobe.com/en/docs/experience-platform/xdm/field-groups/profile/identitymap
https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/config-vars/visitorid
https://experienceleague.adobe.com/en/docs/experience-platform/datastreams/configure
Views
Replies
Total Likes
In our custom AA custom implementation there was a need to wipe and reconstruct the s object before the adobe call was made. Now, in case of the web sdk we don't have such a necessity.
Question - can we rely on the web sdk base code to set the marketing cloud ID ? Can you foresee any issues with this approach ?
Views
Replies
Total Likes
Hi @Franc_G
the marketing cloud id being the ECID is automatically set from the WebSDK.
If you have the need to assign it to a prop or eVar, I would recommend using datastream mapping. Implemented it for a different client and it works super.
Views
Replies
Total Likes
@bjoern__koth thanks for the above. We have a situation where a visitor moves from mobile app to web and we need to reset the ECID with MID obtained from the mobile app OR stitch those two together to indicate that it is the same user moving from app to web. What would be best way to do it ? I have looked at the identitymap. But unsure whether I need to include the
xdm.identityMap
on each analytics call when MID is available (we pass / handover) the MID via query string parameter.
Views
Replies
Total Likes
Hi @Franc_G
maybe this helps:
@bjoern__koth So, based on the above, I don't need to set up anything in the ?
xdm.identityMap
Thank you.
Views
Replies
Total Likes
Well I would give it a try and see whether the information gets picked up in your requests
@bjoern__koth I have tried to mock the request by adding the "adobe_mc" qp parameter, but nothing is being picked up automatically. Below is the url I am have generated:
https://sit.fil.co.uk/bereavement-notification/?adobe_mc=test&ECID=123456&MCID=87878787878787&MCORGI...
Can't see the
xdm.identityMap
in any of the request. Generated the URL based on the doc provided.
Views
Replies
Total Likes
Hi @Franc_G
this is a working sample URL from one of my clients.
on the receiving end, if I execute the alloy getIdentity call
alloy("getIdentity")
.then(function(result) {
if (result?.identity?.ECID) alert(result.identity.ECID);
})
.catch(function(error) {
console.error("something went wrong", error)
});
Note that we're using a different use case, we're using the Web SDK "Redirect with identity" action to append the identifiers on link clicks between known domains.
But the basic logic behind it is the same, hence the identityMap is also populated with the ECID.
Views
Replies
Total Likes
Views
Likes
Replies