Widget Attribute Details

Detail

1. data-token

  • Description: The authentication token verifies access to the widget.

  • Usage: Set this attribute to the token provided in your Feedloop AI dashboard.

  • Example:

    htmlCopy codedata-token="YOUR_TOKEN_HERE"

2. data-identity

  • Description: A unique identifier to associate the widget with a specific user.

  • Purpose: Tracks user sessions and provides personalized interactions.

  • Example:

    htmlCopy codedata-identity="user@example.com"

3. data-profile-*

  • Description: Attributes prefixed with data-profile- allow additional user details, such as name, gender, or preferences, for a personalized experience.

  • Example:

    htmlCopy codedata-profile-name="John Doe" 
    data-profile-gender="male"

4. data-fullscreen

  • Description: Automatically enables fullscreen mode for the widget when set to true.

  • Purpose: Enhances user focus on the chatbot.

  • Example:

    htmlCopy codedata-fullscreen="true"

5. data-hide-header

  • Description: Hides the widget header when set to true for a minimalistic appearance.

  • Purpose: Creates a simpler interface by removing the header.

  • Example:

    htmlCopy codedata-hide-header="true"

Best Practices for Integration

  1. Secure Your Token:

    • Keep the data-token value secure and avoid exposing it in public repositories.

  2. Test in Staging:

    • Before deploying the widget to production, test it in a staging environment to ensure proper functionality.

  3. Dynamic Identity Binding:

    • If your users log in to your application, dynamically set the data-identity attribute in JavaScript to associate the widget with their session.

Last updated