Onsite API
The following APIs are called using window.KAMPYLE_ONSITE_SDK.API;
. For example, window.KAMPYLE_ONSITE_SDK.loadForm(5);
loads the form with formId number 5.
API Name | Description |
| Starts a new targeting session. Would probably be implemented in SPAs |
| Sets local storage variable Once turned off, logs are not collected. |
| Sets local storage variable Once turned on, all logs are written to a private variable. |
| Usually targeting runs for all form types once the onsite script is loaded, This feature prevents targeting for invite on load, and it is executed on demand by the customer using this API. Important: This feature is available upon request. Ask your Medallia expert to file a Feature activation request with Medallia Support. |
| Loads and displays the specified form. Can pass an options object to the form |
| Prints all the logs collected from the moment |
| Loads the specified form into view identified by its formId |
| Returns true if there is an open survey (form) or intercept (invite) |
| Closes form/s based on the following values: formId - Closes the specific form identified by the form ID. all - Closes all open forms. embedded - Closes all open embedded typed forms. modal - Closes the open modal form, whether it is animation or lightbox. Returns true if at least one form was closed. |
| Where integrationName is: contentSquare clickTale glassbox sessionCam tealeaf decibelInsight userReplay fullStory quantumMetrics For Digital Experience Analytics (decibelInsight) integration it's also used for making sure the session-id is updated correctly. It should be called after the integration has initialized in case the form was loaded before that. |