# Triggering surveys via custom properties

### Overview

Custom triggering properties are used to have a more fine-grained control over the triggering properties of a Feedbackly website widget.

For instance, you might want to trigger a survey based on whether a customer is logged in to the members' are in your website. This can be easily accomplished provided that there is Javascript access to the information required to set the triggering behavior.

### Set up custom triggering parameters in the Feedbackly dashboard

In the website triggering options, open up *Advanced targeting* and add the property under *Custom Properties* like so

![](/files/-M1f4_vAfZduN9gR-b2f)

### Adding a custom triggering property to the Feedback widget via the Javascript API

When the Feedbackly widget is installed, run

```
FBLY.action("addCustomProperty", KEY, VALUE)
```

**Example**

Let's assume the information of the logged in status is stored in a Javascript variable accessible in the namespace the widget command is run. For this example, we'll assume it's stored in `user.loggedIn` variable.

Running `FBLY.action("addCustomProperty", "loggedIn", "true")` will tell the widget that the user is logged in. If the widget triggering settings has that property set, the survey will then trigger (if no other restrictions are set)

### Removing a single custom triggering property

When you want to prevent further surveys from displaying because of a custom property

When the Feedbackly widget is installed, run

```
FBLY.action("removeCustomProperty", KEY)
```

**Example**

Following the previous example, if we want to remove a custom triggering property (let's say the user logs out) we would run this command:

`FBLY.action("removeCustomProperty", "loggedIn")`

### Clearing all custom properties

This command clears all custom triggering properties of the visitor

```
FBLY.action("clearCustomProperties")
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.feedbackly.com/website-widgets/adding-custom-triggering-properties-to-widget.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
