JUMP TOJavascript APIJavascript API documentationIdentifying visitorsUpdating a profileOpen the AI componentLaunching a web componentTracking consentOpting inOpting outGetting the visitor IDTracking audiences by eventInserting dynamic contentSetting a keyRetrieving a keyList of Unless propertiesListening for eventsContent Security Policy (CSP)REST APIAISending a questionpostSending feedbackpostSummarizationpostSimilaritypostPowered by Getting the visitor IDSample code JavaScript// retrieve the current visitor ID var visitorId = Txt.getVisitorId() Get visitor ID returns the current visitor ID. You can use this if you want to store the visitor ID in your own backend for later use. JavaScriptTxt.getVisitorId()