How to use the corner button when embedding?

Learn more on how survey can be accessed through Segmanta's native button or any other button on your website.

The SegmantaWidgets object provides methods for interacting with Segmanta customer engagement widgets embedded in your website or app. This allows you to programmatically open, close, and interact with widgets like surveys, inquiries, and more.

Usage

To use the SegmantaWidgets object, simply call one of the methods:

js

Copy code

SegmantaWidgets.openWidget(surveyId);
SegmantaWidgets.closeWidget(surveyId);

The surveyId refers to the unique identifier for the widget you want to interact with.

Methods

openWidget(surveyId)

Opens the widget matching the provided surveyId. For example:

js

Copy code

SegmantaWidgets.openWidget('12345');

This will open the widget with an ID of 12345. If the widget is not found or has not been initialized, it will log a warning to the console.

closeWidget(surveyId)

Closes the widget matching the provided surveyId. For example:

js

Copy code

SegmantaWidgets.closeWidget('12345');

This will close the widget with an ID of 12345. If the widget is not found or has not been initialized, it will log a warning to the console.