BugMuncher Documentation

Run-time Options

With BugMuncher’s run-time options, you can specify options for the feedback button and interface at run-time. This allows you to easily have different options for different pages, or depending on Javascript conditions.

Note: Run-time options will always take priority over the options you specify in the website settings section of the control panel.

Run-time options are set in the bugmuncher_options global object in your embed code, along with the required API key:


language string

Default: 'en'

This specifies the language in which the user interface should be displayed, the value must be a 2 character language code, and can be any of the following:
  • en – English (default)
  • cz – Czech
  • de – German
  • dk – Danish
  • es – Spanish
  • fr – French
  • hu – Hungarian
  • it – Italian
  • nl – Dutch
  • pt – Portuguese
  • ru – Russian
  • se – Swedish
  • tr – Turkish

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  language: 'fr' // Set the language to 'French'
};

position string

Default: 'right'

Can be either 'left' or 'right'. Set this to 'left' if you would like the feedback button to display on the left hand side of the screen.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  position: 'left'
};

style string

Default: 'label'

Can be either 'label' or 'tab'. Set this to 'tab' if you would like the feedback button to be displayed horizontally on the bottom of the screen, instead of vertically at the side of the screen.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  style: 'tab'
};

label_text string

Default: 'Feedback'

Modify this to change the label text on the feedback button. If you do not define this, the default of 'Feedback' will be used, and will be translated to the appropriate language if you set the language to anything but English.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  label_text: 'Report an Issue'
};

feedback_values hash

Default: null

The feedback_values hash can be used to specify default values for you feedback fields, as well as Custom Data.

The hash is in the format { field_api_name: field_value }. The field's API name can be found in the Form Builder section of the BugMuncher control panel. Default field API names always start with an underscore.

Default feedback categories also have underscore prefixed API names which can be found in control panel when setting up your category field. This is so that the category names can be translated into other language.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  feedback_values: {
    _email: 'matt@bugmuncher.com',
    _category: '_problem',
    user_id: 69,
  }

};

background_color string

Default: '#222222'

Controls the background color of the Feedback button. This can be any valid Hexadecimal RGB Color.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  background_color: '#0064cd' // Blue
};

text_color string

Default: '#ffffff'

Controls the text color of the Feedback button, as well as the inner border color. This can be any valid Hexadecimal RGB Color.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  text_color: '#0000000' // Black
};

skip_to string

Default: null

By setting this to either specific or general you can make BugMuncher bypass the screen in which users are asked whether they'd like to give specific or general feedback, and instead skip straight to the option you specified.

Note: If you have no active fields in your feedback form, BugMuncher will always skip to the specific stage, as there will be no fields to display on the general stage.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  skip_to: 'general'
};

show_help boolean

Default: true

Set this to false to hide the help screen that is usually displayed when giving specific feedback. The help will still be shown if the ? help button on the toolbox is clicked.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  show_help: false
};

show_thanks boolean

Default: true

Set this to false to simply exit BugMuncher as soon as feedback is sent, instead of showing the "Thanks for the Feedback!" message.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  show_thanks: false
};

default_include_screenshot boolean

Default: false

When sending general feedback through BugMuncher, users have the option to include a full page screenshot with the feedback by ticking a checkbox. By default this checkbox is unchecked, as automatically including a screenshot could have privacy implications if the page contains sensitive information.

You can make the checkbox ticked by default by setting this option to true, but be sure to only do this on pages where you know there will no information you wouldn't want included in a screenshot.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  default_include_screenshot: true
};

show_include_screenshot boolean

Default: true

Set this to false if you wish to hide the include screnshot checkbox from the general feedback form. When this is set to false, default_include_screenshot will no longer have any effect, as it would be a privacy risk to take a screenshot of the page without the end user knowing it was happening.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  show_include_screenshot: false
};

hide_button boolean

Default: false

If you set this to true, BugMuncher will load normally, but the feedback button will not be shown. Instead you will be able to trigger BugMuncher to open using the JavaScript API's open method.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  hide_button: true
};

disable_event_log boolean

Default: false

If you set this to true, BugMuncher will not log event, such as page loads, AJAX requests and Javascript errors.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  disable_event_log: true
};

event_log_max_length integer

Default: 100

To avoid filling your browsers memory, BugMuncher only stores the most recent 100 events. You can change this to any other number, if you'd like more or less event history to be stored.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  event_log_max_length: 420
};

cookies hash

Beta - This feature is currently in beta, and may not always work. Please get in touch if you find any issues with it.

Default: null

Use this to set cookies on BugMuncher's screenshot server. Eg: if your site's CSS or images require authentication, you can specify an authenticated cookie value so that the BugMuncher screenshot server can access them.

The cookies hash should be in the format of URL: { cookie_name: cookie_value }. Multiple URLs can be specified, and each URL can have multiple cookies (see the example below).

The URL is required as the screenshot server first needs to navigate to this URL in order to set the cookie. It's best to choose a fast loading page to keep screenshot creation as quick as possible.

Please note: The URLs must be for HTML documents, as some browsers will not allow cookies to be set on images or any other non-HTML URLs.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  cookies: {
    'http://yoursite.com': {
       cookiename:'cookievalue',
       cookie_two:'something'
    },
    'http://google.com': {
      more:'cookies'
    }
  }

};

suppress_localhost_warning boolean

Default: false

Set this to true to hide the localhost warning message that is displayed when running BugMuncher on a local environment.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  suppress_localhost_warning: true
};

require_email boolean

Depreciated - You can now choose whether or not to require an email address in your website's form builder within the BugMuncher control panel.

Default: false

Set this to boolean true if you want to require an email address when sending feedback through BugMuncher. The default value is false.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  require_email: true
};

default_category integer

Depreciated - Use the feedback_values option instead, eg: feedback_values: { _category: '_suggestion' }"

Default: null

Set this to a valid category ID for you website to pre-select a default feedback category. You can find the category IDs in the control panel, choosing 'Feedback Categories' from the left menu, and checking the ID column from the table of categories.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  default_category: 1234
};

prefill_email string

Depreciated - Use the feedback_values option instead, eg: feedback_values: { _email: 'matt@bugmuncher.com' }"

Default: null

Set this to define a default email address, eg: authenticated users in your web app.

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  prefill_email: 'matt@bugmuncher.com'
};

http_auth string

Depreciated - Adding HTTP Auth credentials to URLs no longer works in all browsers, instead you should use the cookies option if your site's assets require authentication."

Default: null

If your site is behind HTTP Basic authentication, you'll need to provide a username and password to allow BugMuncher to access your images, CSS files and custom fonts, otherwise the screenshots will not render correctly. The username and password should be separated by a colon, eg: username:password

Example:

var bugmuncher_options = {
  api_key: "[YOUR API KEY HERE]",
  http_auth: 'randal:correcthorsebatterystaple'
};