> Control where an embedded LiveDemo starts, autoplay, audio, custom links and personalization with URL parameters.

Canonical: https://livedemo.ai/docs/share/url-parameters/

# URL parameters

Add these to the `src` of the [embed code](https://livedemo.ai/docs/share/embed-on-website/), the URL that starts with `https://story-api.livedemo.ai/workspaces/...`.

| Parameter | Example | Effect |
| --- | --- | --- |
| `step` | `step=3` | Step to start on. Starts at 1 |
| `embed` | `embed` | Embedded layout. Already in the embed code |
| `autoplay` | `autoplay=true` | Plays on its own. See [Autoplay](https://livedemo.ai/docs/edit-a-livedemo/autoplay/) |
| `autoplayDelay` | `autoplayDelay=4` | Seconds per step when autoplaying. Default 2 |
| `disableAudio` | `disableAudio=true` | No voiceover or music |
| `link` | `link=LINK_ID` | Values of a [custom link](https://livedemo.ai/docs/share/custom-links/) |
| `vars` | `vars=eyJjb21wYW55IjoiQWNtZSJ9` | Variable values (below) |
| `sessionDisabled` | `sessionDisabled` | Don't record this view in analytics |

Example:

```
https://story-api.livedemo.ai/workspaces/WORKSPACE_ID/stories/DEMO_ID/preview?step=1&embed&autoplay=true&autoplayDelay=4
```

The `https://app.livedemo.ai/livedemos/...` share link doesn't pass these parameters on. Use the embed URL.

## vars

Set [variables](https://livedemo.ai/docs/edit-a-livedemo/variables/) from your own code, without creating custom links. Pass a JSON object, base64url-encoded:

```js
const vars = btoa(JSON.stringify({ company: 'Acme', firstName: 'Jane' }))
    .replace(/\+/g, '-')
    .replace(/\//g, '_')
    .replace(/=+$/, '')
const src = `https://story-api.livedemo.ai/workspaces/WORKSPACE_ID/stories/DEMO_ID/preview?step=1&embed&vars=${vars}`
```

Rules:

- Up to 20 variables.
- Names start with a letter and use letters, numbers and `_` (up to 40 characters).
- Values are text or numbers, cut at 200 characters.
- `vars` wins over `link` values, which win over the defaults.
- `btoa` only handles Latin characters. For other characters, encode the JSON as UTF-8 first.

## Use cases

- `sessionDisabled` on internal pages, so your team's views don't count. Or [exclude your IPs](https://livedemo.ai/docs/analytics/exclude-internal-traffic/).
- `step` to open a help-center demo at the relevant step.
- `vars` with your logged-in user's name for in-app onboarding.

---

Next: [Embed events](https://livedemo.ai/docs/share/embed-events/)
