> ## Documentation Index
> Fetch the complete documentation index at: https://www.mellowtel.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect feedback from your users

Mellowtel provides a pre-built feedback page that you can use to collect feedback from your users so you can iterate faster and improve your product.
Right now the page is available only for browser plugins. The feedback page is similar to this [one](https://www.mellowtel.com/uninstall-feedback/?extension_id=testId\&configuration_key=testConfiguration) by passing your plugin icon and name dynamically.

You can then read the feedback from the Mellowtel dashboard and use it to improve your browser plugin.

IMPORTANT: You will be able to read the feedback from the Mellowtel dashboard only if you have a plugin that is published on the web store and not in dev mode.
If you are still in development and want to test the feedback page please reach out via the chat.

Here's how you can add the feedback page to your browser plugin:

## Add the feedback page to your plugin

The feedback page is hosted by Mellowtel and is accessible via a URL that you can generate using the `generateFeedbackLink()` method from the Mellowtel JS package.

If you want to directly open the feedback page in a new tab, you can use the `generateAndOpenFeedbackLink()` method and it will open a page similar to this [one](https://www.mellowtel.com/uninstall-feedback/?extension_id=testId\&configuration_key=testConfiguration). dynamically passing your plugin icon and name.

You can open the feedback page by calling the `generateFeedbackLink()` method from your extension's background script or content script when a user uninstalls your browser plugin.

Here's how you can do it.

Open your `service worker` file (also known as background script) and add the following code:

Remember to replace `<YOUR_CONFIGURATION_KEY>` with your actual Mellowtel configuration key. If you don’t have a configuration key yet, you can get one by signing up at [Mellowtel](https://www.mellowtel.com/mellowtel-auth/).

```javascript theme={null}
import Mellowtel from "mellowtel";

let mellowtel;

(async () => {
    mellowtel = new Mellowtel("<YOUR_CONFIGURATION_KEY>");
    await mellowtel.initBackground();
})();

// Open the feedback page when the user uninstalls the extension
chrome.runtime.onInstalled.addListener(async function(details) {
    console.log("Extension Installed or Updated");
    // If you want to handle install and updates differently
    /**
    if(details.reason === "install"){
        // call a function to handle a first install
    } else if(details.reason === "update") {
        // call a function to handle an update
    }
    **/
    // await mellowtel.generateAndOpenOptInLink(); to handle users settings. For more details: opt-in-out docs
    const uninstallURl = await mellowtel.generateFeedbackLink();
    chrome.runtime.setUninstallURL(uninstallURl);
});
```
