Skip to main content
This module provides methods to set custom data for tracking customer or visit characteristics. It also includes data management methods to retrieve and write data in Kameleoon’s unified LocalStorage.

readLocalData

The readLocalData() method reads local data you previously stored through writeLocalData(). The engine retrieves this data from unified Local Storage, which bypasses standard storage limitations.
Arguments Return value

performRemoteSynchronization

The performRemoteSynchronization() method triggers a Server Synchronization Call (SSC) to the Data API. This call retrieves visit history stored on Kameleoon backend servers for the current visitor and writes it to LocalStorage. The synchronization ensures that the data is accessible through the Activation API and available for targeting. This method typically runs automatically for cross-device reconciliation or Safari ITP. It doesn’t require manual invocation.
Arguments

resetCustomData

The resetCustomData() method resets a custom data value.
Arguments

retrieveDataFromRemoteSource

The retrieveDataFromRemoteSource() method retrieves data stored on a remote Kameleoon server with the specified key. This method supports retrieving data previously stored through the Data API. Use this for quick storage and retrieval of large data volumes for visitors. This asynchronous mechanism requires a callback function when the server call completes.
Arguments

setCustomData

The setCustomData() method sets a custom data value.
Arguments

writeLocalData

The writeLocalData() method records local data in the visitor’s browser for later retrieval through readLocalData(). The engine stores this as unified session data in Local Storage, bypassing standard storage limitations. Data becomes available immediately for retrieval in the same tab through RAM caching, while the physical write occurs asynchronously.
Arguments