# Open a quiz from your own button

> Make any button in your theme open a quiz, in a popup or full screen, with the quiz's ID.

Source: https://help.attravo.com/product-quiz/articles/open-a-quiz-from-your-own-button
Updated: 2026-10-06

Any button or link in your theme can open a quiz, such as a hero banner's button or a product page's "Help me choose". You give it the quiz's ID, and the app embed does the rest.

## Before you start

Turn on the **Quizz Core Script** app embed in your theme. See [Turn on the Quizz Core Script app embed](https://help.attravo.com/product-quiz/articles/turn-on-the-app-embed.md).

![App embeds with Quizz Core Script on](https://xprvgpfulbcxrftgyppu.supabase.co/storage/v1/object/public/help-media/5d8df30e-32a3-4311-b03c-158adc08841b/26c6b449-14c5-4b56-862b-ad70599c7b2b/button-4-core-script-a99b08ddf0.webp#w=2072&h=1052)

The quiz must be published.

## Copy the quiz's ID

1. Open the quiz and select **Settings**.
2. Under **Placing it in your theme**, select **Copy** next to **Quiz ID**.

![Placing it in your theme, with Copy highlighted next to the Quiz ID](https://xprvgpfulbcxrftgyppu.supabase.co/storage/v1/object/public/help-media/5d8df30e-32a3-4311-b03c-158adc08841b/26c6b449-14c5-4b56-862b-ad70599c7b2b/button-1-quiz-id-eb151c8b11.webp#w=1342&h=660)

## Add it to a button

Give the button a `data-quiz-id` attribute with the ID you copied. For example, in a **Custom Liquid** section or your theme's code:

```html
<button type="button" data-quiz-id="6ac4bcbe3d446dac439f64cf">Find my routine</button>
```

Your theme's own button styles still apply.

![A store banner with its Find my routine button highlighted](https://xprvgpfulbcxrftgyppu.supabase.co/storage/v1/object/public/help-media/5d8df30e-32a3-4311-b03c-158adc08841b/26c6b449-14c5-4b56-862b-ad70599c7b2b/button-2-hero-baf3d0f79d.webp#w=2400&h=787)

## How it opens

- In a popup, for most quizzes.
- Full screen, when the quiz's **Show this quiz in** is **Dedicated page**.

![The quiz in a popup over the store page](https://xprvgpfulbcxrftgyppu.supabase.co/storage/v1/object/public/help-media/5d8df30e-32a3-4311-b03c-158adc08841b/26c6b449-14c5-4b56-862b-ad70599c7b2b/button-3-open-d3cf2612b4.webp#w=1532&h=1484)

To choose for one button, add `data-quiz-mode="popup"` or `data-quiz-mode="page"`. To give the popup a heading, add `data-quizz-modal-heading` and `data-quizz-modal-subheading` with your text.

> [!TIP]
> If the quiz doesn't open, check that the ID matches the one under **Placing it in your theme**, and that the quiz is published.
