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

# Next Steps with Your AI Prototype

Once Sprig is installed in your prototype (see [Installing Sprig in AI ("Vibe-Coded") Prototypes](/docs/sprig-studies/prototype-studies/install-with-ai-prototypes/index)), [no-code events](/docs/shared-study-foundations/events/no-code-events) already cover most targeting needs. If you want finer control over when a study triggers, or more context about who's responding, you can ask the AI for that too. Same method: paste a prompt into the chat.

<Note>
  **You still don't need to write or read any code.** Give the AI the prompt below the same way you gave it the install snippet.
</Note>

This works the same regardless of which AI prototyping tool you're using.

## Code Events

[Code events](/docs/shared-study-foundations/events/code-events) let you trigger a study off something no-code events can't see, for example a specific button click deep in a multi-step flow.

<Info>
  If you're using **Builder.io** without deploying anywhere else, a code event isn't optional there, it's the only way to trigger a study in the Builder preview. See the Builder.io section of [Installing Sprig in AI Prototypes](/docs/sprig-studies/prototype-studies/install-with-ai-prototypes/index) for that specific prompt.
</Info>

Ask the AI, depending on which install method you used:

* If you installed the **HTML snippet**:

  > Add `Sprig('track', 'my_event_name')` when \[describe the moment, e.g. "the user clicks the Submit button" or "the page loads"].

* If you installed via **npm/pnpm**:

  > Add `Sprig.track('my_event_name')` when \[describe the moment].

Replace `my_event_name` with whatever [event name you've configured in Sprig](/docs/shared-study-foundations/events/code-events), then create your study and set that as the trigger.

## Attributes

[Attributes](/docs/shared-study-foundations/attributes) attach extra context to a respondent, like their plan type or how long they've been a user, so you can filter your audience or dig into responses later. They're nice to have, but never required to get a study running.

Ask the AI, depending on which install method you used:

* If you installed the **HTML snippet**:

  > Add `Sprig('setAttribute', 'attribute_name', 'value')` when \[describe the moment].

* If you installed via **npm/pnpm**:

  > Add `Sprig.setAttribute('attribute_name', 'value')` when \[describe the moment].

Swap in your own attribute name and value (or ask for `setAttributes`/`'setAttributes'` with multiple key-value pairs at once, if you want to set several together). Once they start flowing in, you'll see them on the **Attributes** page in your Sprig instance.

<Tip>
  Not sure which install method you used? Check with whoever set it up, or look at [your tool's row](/docs/sprig-studies/prototype-studies/install-with-ai-prototypes/index) in the "Ask the AI for..." column.
</Tip>
