Skip to content

Feedback form customization

Need to customize or translate texts in the Ybug launcher button or feedback forms? You can customize text in all parts of the Ybug app.

Enabling/disabling fields

You can customize the feedback form to meet your needs. Currently supported fields are: Feedback type, Comment, Name, Email, Phone, Priority, Rating (with stars or emoji) and Net Promoter Score®. You can make these fields hidden, optional or required.

Default feedback form settings:

javascript
window.ybug_settings = {
    id: 'XXXXXXXXX',
    rating: false,            // Rating is disabled by default
    rating_required: false,
    rating_type: 'emoji',     // Possible values: 'stars', 'emoji'
    comment: true,            // Comment is enabled and required
    comment_required: true,
    name: false,              // Name field is disabled
    name_required: false,
    email: true,              // Email field is enabled and optional
    email_required: false,
    type: false,              // Feedback type (Bug, Improvement, Question, ...)
    type_required: false,
    title: false,             // Feedback title/summary field
    title_required: false,
    priority: false,          // Feedback priority
    priority_required: false,
    phone: false,             // Phone number field
    phone_required: false,
    nps: false,               // Net Promoter Score® field
    nps_required: false,
};

Launcher button

To change the label of the Ybug launcher button to your own call-to-action text (for example "Report a problem" instead of "Send feedback"), add a translate object with the launcherButton.Title option:

javascript
window.ybug_settings = {
    id: 'XXXXXXXXX',
    translate: {
        "launcherButton.Title": "Report a problem",
    }
};

Additional options

NameTypeDefaultDescription
close_countdownint | false5Countdown (in seconds) before the Thank-you dialog closes. Pass a negative number to close the Thank-you page immediately, or false to disable the countdown.

Translations BASIC

To customize the translations of certain text elements within the widget, use the translate setting. It's a JSON object containing key-value pairs where the key is the text element ID and the value is your translation.

javascript
window.ybug_settings = {
    id: 'XXXXXXXXX',
    translate: {
        "launcherButton.Title": "Feedback",
        "feedbackTypeForm.Heading": "What kind of feedback?",
        "feedbackForm.Heading": "Send us feedback",
        // ...add other keys you want to override
    }
};

Any text elements you don't define will use the default texts. The full list of translatable keys is available in your Ybug dashboard.

Multi-language setup

To set up multiple languages at once, use the translations setting. It's a JSON object where each key is a language code (e.g. en, de, cs, …) and the value is another JSON object containing key-value pairs for that language. The keys are the same as in the translate setting above.

javascript
window.ybug_settings = {
    id: 'XXXXXXXXX',
    translations: {
        'en': {
            "launcherButton.Title": "Feedback button",
            "feedbackTypeForm.Heading": "Feedback please!"
        },
        'de': {
            "launcherButton.Title": "Feedback",
            "feedbackTypeForm.Heading": "Feedback bitte!"
        }
    }
};

The translate setting takes precedence over translations — any text elements defined in translate override the corresponding ones in translations for any language.