getVisitorId()

The _satellite.getVisitorId() method returns an instance of the Adobe Experience Cloud ID service within your tag property, if you have the ID service extension installed and published. This method is helpful when you want direct access to the visitor ID instance for usage in custom code blocks, advanced data element configuration, or troubleshooting visitor identity issues.

IMPORTANT
This method only applies to properties that include the standalone Experience Cloud ID service tag extension. It does not apply to the implicit ID service capabilities available in the Web SDK tag extension. See the getIdentity command if you need to get a visitor identity using the Web SDK’s implicit ID service capabilities.

If you call this method with the ID service extension installed and published, an object is returned similar to the object obtained after calling the Visitor.getInstance() method. If you call this method when the ID service extension is not installed or published, the method returns null.

_satellite.getVisitorId(): Visitor | null

Available fields and methods

See the Experience Cloud ID service Methods in the Experience Cloud Visitor ID service documentation to see what fields and methods are available to you.

// Retrieve a visitor's ECID
_satellite.getVisitorId().getMarketingCloudVisitorID();

// Retrieve a visitor's legacy Analytics ID
_satellite.getVisitorId().getAnalyticsVisitorID();

// Retrieve a visitor's Audience Manager blob for audience sharing
_satellite.getVisitorId().getAudienceManagerBlob();
recommendation-more-help
1ae86b30-e55e-49c1-ab11-9d0356a5f3e1