Go BackLogo

Documentation

Comprehensive guide for integrating and customizing the SayJet feedback widget.

Quick Start

To get started with SayJet, add the following script tag to your website's header or footer:

Then, add a button with the data-sj-channel attribute to your website:

Configuration Options

The widget can be customized using various data attributes. Here's a complete list of available options:

Required Attributes

AttributeTypeDescription
data-sj-channelstringYour unique channel ID (required)

Optional Attributes

AttributeTypeDefaultDescription
data-sj-form-titlestringFeedbackCustom title for the feedback form
data-sj-submit-textstringSendCustom text for the submit button
data-sj-optional-emailbooleanfalseMake the email field optional
data-sj-pre-fill-emailstring""Pre-fill the email field with a specific value
data-sj-color-primarystring#000000Primary color for buttons and accents
data-sj-color-primary-foregroundstring#000000Primary color for buttons and accents
data-sj-color-backgroundstring#ffffffBackground color of the widget
data-sj-color-foregroundstring#000000Text and icons color
data-sj-color-graystring#e5e5e5Color for borders and inputs
data-sj-corner-radiusstring0.75remBorder radius for all elements
data-sj-screenshot-ignorebooleanfalsePrevent from item to include in screenshot (can be used on any element)

Examples

Basic Example

Customized Theme Example

Best Practices

Placement
Add the script tag in your website's header or footer for optimal loading.

Button Location
Place the feedback button where it's easily accessible but not intrusive.

Customization
Use the optional attributes to match your website's design and branding.

Email Collection
Consider using data-sj-optional-email to gather user contact information when appropriate.

Pre-fill Email
Use data-sj-pre-fill-email to pre-fill the email field with a specific value - this is useful for collecting feedback from logged in users in your application/dashboard/checkout page (e.g. data-sj-pre-fill-email="test@test.com").

Screenshot Ignore
Use data-sj-screenshot-ignore to prevent any element from being included in screenshots - this is useful to prevent sensitive information from being captured in screenshots.

Technical Details

Widget Loading

The widget is loaded asynchronously to prevent any impact on your website's performance. It uses a deferred script loading strategy

Data Collection

The widget collects the following information:

Security

All data is transmitted securely over HTTPS. The widget implements:

Troubleshooting

Common Issues

Widget Not Loading

Customization Not Working

Form Submission Issues

Support

For additional support or questions, please contact our team at hello@sayjet.com.

API Reference

The widget exposes a simple API through the global window.SayJet object for programmatic control. This can be useful for:

Available Methods

Usage Example

Here's a complete example of how to use the API:

TypeScript Support

If you're using TypeScript, the widget includes type definitions:

Best Practices

Check for API Availability

Error Handling

Performance

User Experience

Webhooks

Webhooks allow you to receive real-time notifications when new feedback is submitted. This feature is available for paid plans only.

Setting Up Webhooks

  1. Navigate to the Webhooks section in your dashboard
  2. Click "Add webhook" and fill in the following details:
    • Name: A descriptive name for your webhook
    • URL: The endpoint where you want to receive notifications
    • Channel: Select which channel's feedback you want to receive
    • Secret (optional): A secret key for verifying webhook requests

Webhook Payload

When new feedback is received, your webhook endpoint will receive a POST request with the following JSON payload:

Webhook Management

You can manage your webhooks through the dashboard:

Security

Best Practices

  1. Endpoint Security

    • Always use HTTPS endpoints
    • Implement secret verification
    • Set up proper error handling
  2. Monitoring

    • Check the "Last sent" and "Last result" columns
    • Monitor your endpoint's response time
    • Set up alerts for failed deliveries
  3. Performance

    • Keep your endpoint response time under 5 seconds
    • Handle webhook payloads asynchronously
    • Implement proper error logging
  4. Testing

    • Test your webhook endpoint before going live
    • Verify payload structure and handling
    • Check error scenarios and retry logic

Version History

v1.0.0 (Current)