How do I capture the AMC visitor ID in a data element

Avatar

Avatar

scottt6073095

Avatar

scottt6073095

scottt6073095

28-03-2017

Hi,

trying to figure out how to capture the AMC visitor ID in a  data element to pass to a evar on pageload.

any help is greatly appreciated.

- Scott

Replies

Avatar

Avatar

Saurabh_Kumar1

Avatar

Saurabh_Kumar1

Saurabh_Kumar1

28-03-2017

Hello,

  Check this documentation - https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-getmcvid.html

Regards,

Saurabh Kumar.

Avatar

Avatar

hyderziaee

Employee

Avatar

hyderziaee

Employee

hyderziaee
Employee

29-03-2017

If you are using DTM, then the function call would be different:

_satellite.getVisitorId().getMarketingCloudVisitorID()

You could also read the cookie using document.cookie and then apply string functions to get the AMCV cookie value. 

Avatar

Avatar

scottt6073095

Avatar

scottt6073095

scottt6073095

29-03-2017

This is perfect. Just what I needed. and thanks for bringing up the cookie method as this may come in handy at some point.

thanks for all your help,

Scott