Retrieve visitor information

From Genesys Documentation
Jump to: navigation, search
This topic is part of the manual Journey JavaScript SDK for version Current of Altocloud.

Use the Visit API and Customer API to retrieve visitor information.

Retrieve visitor information

Use the Visit API and the Customer API to retrieve visitor information.

Visit API

Name Description
ac('api.visit.get', callback) Performs an AJAX request to retrieve the session data from the Altocloud server. The object returned contains the most up-to-date data for the session. This is useful for monitoring live data, such as segment assigned IDs, outcome score progress, and last page viewed.
ac('api.visit.cached', callback) Retrieves the cached Altocloud session data from the browser local storage. If session data does not exist in local storage, a session will be requested via an AJAX request from Altocloud. This is practical for retrieving data that doesn't change for a session, such as the visit identifier, device details, location, referrer, and marketing campaign information.
ac('api.visit.getShortId', callback) This provides the same functionality as 'api.visit.cached', but only the 'shortId' is returned. The short ID is useful as a legible reference number that can be displayed on the website.

Customer API

Name Description
ac('api.customer.get', callback) This performs an AJAX request to retrieve the visitor data from the Altocloud server.