Skip to main content
This module provides a shortcut to obtain a reference to the current Visitor object. The Activation API contains a single, unique Visitor object. This module also allows you to override the visitor code.

setVisitorCode

The setVisitorCode() method overrides the Kameleoon VisitorCode, which is a unique identifier randomly generated for every visitor. Ensure that your ID is unique and doesn’t exceed 255 characters. Call this method as early as possible, specifically before Kameleoon triggers any experiments. If you update the VisitorCode after the engine assigns a variation, the engine reassigns the variation.

Kameleoon.API.CurrentVisit

This module provides a shortcut to obtain a reference to the current, in-progress Visit object. It references the same object as Kameleoon.API.Visitor.visits[Kameleoon.API.Visitor.visits.length - 1].