> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.feedbucket.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to use Feedbucket on a production (live and public) website

When you install Feedbucket the widget will be visible to everyone that comes to the website. This is the prefered behaviour on staging or test sites but not on production sites.
On production sites (or call it live websites or those that are available to the public) you only want to show Feedbucket to visitors of your choosing. There's a few methods to achieve this as we will look at below.

# Manage visibility through the WordPress Plugin

If you are installing Feedbucket on a WordPress site we recommend that you do so by using our plugin. With the plugin, you have quite a few options to use Feedbucket in production so it's not visible to everyone.

### Only show Feedbucket to logged in users in WordPress

Under the setting `Visibility` make sure that you select `Only authenticated users` and hit `Save`. This means that Feedbucket will only be shown, on the front end, to visitors that are logged into your WordPress site.

### Only show Feedbucket to logged in users that has a specific role

Sometimes you don't want to show Feedbucket to everyone that is logged in but just a sub-set of the users. What you can do then is to select the option `Only users with roles` as the setting `Visibility`. After that, you select the specific WordPress roles that should see Feedbucket. Feedbucket is working with the native WordPress roles here, so use any plugin or code that creates a role. This means that Feedbucket will only be visible to users that are logged in **and** have a specific role.
---

# Use server side logic to control when you insert the script

If you are not using WordPress, it should still be fairly simple to implement server-side logic to control when Feedbucket is visible. Since Feedbucket appears whenever you add the script tag, you'll need to add code to your website or web app that only inserts the Feedbucket widget script when you want to. 

```
if (user_should_see_feedbucket()) {
    // Insert the feedbucket script.
}
```

# Only show Feedbucket when a secret query string is present

The easiest way is to only show Feedbucket when the visitor enters a specific secret code as a parameter. For example, if the visitor goes to [https://examplewebsite.com](https://examplewebsite.com/) Feedbucket will **NOT** show. However, if the visitor enters [https://examplewebsite.com?feedbucketKey=sup3rs3cr3t](https://examplewebsite.com/?feedbucketKey=sup3rs3cr3t), Feedbucket will load like normal.

||| Feedbucket will save your secret for 1 hour so you do not have to continuously add the secret key when navigating to a new page on the website.

### How to set up your project to use the Query Trigger

1. Open your **Project**.
2. Click on the **Settings** tab.
3. Click on **Widget > Visibility** and toggle **Show widget with secret query parameter** on.
4. Use the secret generated automatically (or your own), and hit **Save**.

![](https://storage.crisp.chat/users/helpdesk/website/-/4/c/1/c/4c1cdabe55cf0c00/show-query-widget_1yg9d6c.png)


### How your clients should use the query trigger

If a visitor comes to your website with query trigger activated Feedbucket will not load.
If you tell the person that you want to submit feedbucket to append the secret key that you entered in #3 above like `https://yourwebsite.com?feedbucketKey={secret}`, Feedbucket will load normally.

||| A cookie will be saved for the visitor so that when they navigate around your website, Feedbucket will still be visible even though the feedbucketKey is not present in the URL anymore.
