getAnalyticsVisitorID
- Topics:
- Identities
- Integrations
CREATED FOR:
- Developer
- User
- Admin
- Leader
Returns the legacy Analytics ID (if any) that was stored in the s_vi cookie before the Experience Cloud Identity Service was implemented. It returns an empty string if a visitor was never assigned an Analytics ID.
Syntax var analyticsID = visitor.getAnalyticsVisitorID()
Typically, this function is used with custom solutions that require reading the visitor ID. It is not used by a standard implementation. getAnalyticsVisitorID
also works with callback functions to read Analytics IDs and bring them in to your system or application.
Sample Code
//callback function
var useAnalyticsVisitorID = function(id){
//whatever your function does with the Experience Cloud ID
};
//get Analytics ID and pass it to the function
var analyticsID = visitor.getAnalyticsVisitorID(useAnalyticsVisitorID)
The “aid” Parameter is a Legacy Value
The aid
parameter appears in a query string under 2 different sets of conditions.
Case 1
You will see the aid
parameter in a query string when:
- The Experience Cloud ID service is deployed correctly.
- The user visiting a site has a pre-existing Analytics ID stored in their s_vi cookie.
Case 2
You will see the aid
parameter in a query string when your organization is using a grace period before fully implementing the ID service. If the user visiting your site is new, and you’re not using a grace period, the visitor will get the mid
( Experience Cloud ID) parameter.
Experience Cloud Services
- Identity Service Help
- Overview
- Implementation
- Implementation methods
- Implementation guides
- Implement with Experience Platform tags
- Implement for Analytics
- Implement for Target
- Implement for Analytics and Audience Manager
- Implement for Analytics, Audience Manager, and Target
- Using the ID Service with A4T and a Server-side Implementation of Target
- Direct Integration with the ID Service
- Direct Integration Use Cases
- Test and verify the ID Service
- Opt-in Service
- ID Service API
- ID Service API Overview
- Configuration
- Configurations overview
- audienceManagerServer and audienceManagerServerSecure
- cookieDomain
- cookieLifetime
- disableIdSyncs
- disableThirdPartyCalls
- disableThirdPartyCookies
- idSyncAttachIframeOnWindowLoad
- idSyncContainerID
- idSyncSSLUseAkamai
- loadTimeout
- overwriteCrossDomainMCIDAndAID
- resetBeforeVersion
- sdidParamExpiry
- Secure and SameSite configurations
- secureCookie
- useCORSOnly
- whitelistParentDomain and whitelistIframeDomains
- Methods
- Methods
- appendSupplementalDataIDTo
- appendVisitorIDsTo (Cross-Domain Tracking)
- callTimeOut Methods
- ID Synchronization by URL or Data Source
- getInstance
- getAnalyticsVisitorID
- getCustomerIDs
- setCustomerIDs
- getMarketingCloudVisitorID
- getLocationHint
- getVisitorValues
- isClientSideMarketingCloudVisitorID
- resetState
- Reference
- Reference Overview
- Analytics Reference
- Analytics Reference Overview
- CNAME Implementation Overview
- Setting Analytics and Experience Cloud IDs
- Order of Operations for Analytics IDs
- ID Service Migration Decision Points
- ID Service Migration Scenarios
- Analytics and Identity Requests
- Server-side Implementation Mixed with JavaScript
- The ID Service Grace Period
- Google Chrome SameSite labelling changes
- Content Security Policies and the ID Service
- COPPA Support in the ID Service
- CORS Support in the ID Service
- Customer IDs and Authentication States
- ECID library methods in a Safari ITP world
- Identifying Unique Visitors
- Get Region and User IDs From the AMCV Cookie or the ID Service
- Requirements for the ID Service
- Video Heartbeat and the ID Service
- Data Workbench and the ID Service
- SHA256 Hashing Support for setCustomerIDs
- FAQs
- Release notes for ID Service
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more