Plug API
Explore the methods and properties available in the Plug API.
The Plug API is the entry point to the JavaScript SDK and provides methods to retrieve content, evaluate requests, platform, track user interactions, and more.
Looking for something specific?
Use the search bar at the top of the page or press / to quickly search through the documentation.
Use the summary below to quickly jump to a specific topic:
Page | Description |
---|---|
plug | Initialize the SDK. |
unplug | Reset the SDK to its initial state. |
identify | Associate the current session with a user. |
anonymize | Disassociate the session from the current user. |
setToken | Replace any existing token with a new one. |
unsetToken | Clear any existing token. |
getUserId | Get the ID of the currently identified user. |
isAnonymous | Check whether the user is anonymous. |
fetch | Fetch the content of a slot. |
evaluate | Evaluate a CQL query in real-time. |
test | Evaluate a CQL condition in real-time. |
track | Track an event in the user session. |
user | Access the user instance. |
session | Access the session instance. |
tracker | Access the tracker instance. |
initialized | Check whether the SDK has been initialized. |
plugged | Await the SDK initialization. |
flushed | Await the transmission of pending events. |