# Open a survey from your own button

Open a survey when someone clicks your own button. For example, add an “Ask about sizing” button beside a product’s size guide.

## Add the button to a website

1. Publish the survey and open **Install on your website** in its editor.
2. Under **Survey to show**, choose **This survey** to collect feedback about a specific subject. Choose **First eligible website survey** to let Shopoll select from the workspace’s [live survey order](/accounts/live-surveys.md).
3. Under **Placement**, select **Custom JavaScript trigger**. Choose **Copy** beside **Embed code** and paste the script into the page or shared template.
4. Copy **Button and click handler** and paste it where the shopper will see the button. Change “Share feedback” to wording that fits the page, such as “Give feedback on sizing”.
5. Open the page as a shopper. Check that the button opens the survey, that you can close it using the keyboard and that a submitted answer appears under **Results**.

![The installation panel with This survey and Custom JavaScript trigger selected](/media/custom-trigger.png)

The supplied button code waits for Shopoll to load if someone clicks early. Use it when you want only your own button to open the survey.

## Use a Shopify theme

In the theme editor, open **App embeds → Shopoll feedback**. Select **Custom JavaScript trigger** and save. Add a button to your theme and call the [storefront JavaScript API](/javascript-api.md) in its click handler. Add the Shopoll code once for this button.

## When the button stays closed

Check the published survey, response allowance, frequency settings and [consent decision](/cookie-consent.md). With automatic selection, the current page and visitor must match an enabled survey. To request a particular published survey from a code for your workspace, pass its survey ID to the JavaScript API.
