Anyone experience MCID returns empty value? | Community
Skip to main content
October 23, 2020
Question

Anyone experience MCID returns empty value?

  • October 23, 2020
  • 0 replies
  • 916 views

We have a button on our website that has an MCID parameter on the url. When we check the analytics, some urls has empty mcid. 

 

We are using the script below to retrieve the mcid value and pass to url. 

var mcID = _satellite.getVisitorId().getMarketingCloudVisitorID();
var url = 'https://www.example.com/?pubref=' + mcID '&siteid=1111';

 

Analytics Report Shows:
https://www.example.com/?pubref=&siteid=1111

 

Questions:

  1. What could be the reason on why mcid is empty? the function is being called only on user click so we expect there is enough time for the mcid to be loaded.
  2. Can we just use _satellite.cookie.get('mcidvscom') to get the MCID value or we still need to use _satellite.getVisitorId().getMarketingCloudVisitorID() or do we need to use both?
  3. What is the proper way to validate or check if the MCID is empty and what is the possible fallback?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.