Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/journeys/embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This guide covers all available embedding options and the `__epilot` JavaScript

:::info Legacy embed flow

This page documents the original `__epilot` iframe script. All new integrations should use the [Journey Embed SDK (Beta)](./sdk), which rewrites the iframe engine and adds support for the [`<epilot-journey>`](./web-components) Web Component behind a single API.
This page documents the original `__epilot` iframe script. All new integrations should use the [Journey Embed SDK](/docs/journeys/sdk), which rewrites the iframe engine and adds support for the [`<epilot-journey>`](/docs/journeys/web-components) Web Component behind a single API.

Existing embeds continue to work. For new projects, start with the SDK.

Expand Down Expand Up @@ -342,11 +342,11 @@ In this example, no `data-ep-` attributes are needed because the `__epilot.init(
**Outcome**
![Embedding Multiple Outcome](../../static/img/journey-embed-outcome-multiple.gif)

## Recommended: Journey Embed SDK (Beta)
## Recommended: Journey Embed SDK

For new integrations, use the [Journey Embed SDK (Beta)](./sdk). It replaces the legacy `__epilot` script documented on this page with a unified JavaScript API that covers both:
For new integrations, use the [Journey Embed SDK](/docs/journeys/sdk). It replaces the legacy `__epilot` script documented on this page with a unified JavaScript API that covers both:

- A **rewritten iframe engine** — same embedding model, faster and cleaner than the legacy bundle.
- The [`<epilot-journey>` Web Component](./web-components) — renders directly in your page using Shadow DOM for better performance, accessibility, and tighter host integration.
- The [`<epilot-journey>` Web Component](/docs/journeys/web-components) — renders directly in your page using Shadow DOM for better performance, accessibility, and tighter host integration.

See the [SDK documentation](./sdk) for setup, the full API reference, and a migration guide from `__epilot.init()`.
See the [SDK documentation](/docs/journeys/sdk) for setup, the full API reference, and a migration guide from `__epilot.init()`.
12 changes: 6 additions & 6 deletions docs/journeys/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
sidebar_position: 5
---

# Journey Embed SDK (Beta)
# Journey Embed SDK

The Journey Embed SDK is a chainable JavaScript API for rendering epilot Journeys. One SDK, two backends:

- A **rewritten iframe engine** that replaces the legacy [`__epilot` script](./embedding) with a faster, cleaner host integration.
- The [`<epilot-journey>` Web Component](./web-components), a custom HTML element that renders in Shadow DOM.
- A **rewritten iframe engine** that replaces the legacy [`__epilot` script](/docs/journeys/embedding) with a faster, cleaner host integration.
- The [`<epilot-journey>` Web Component](/docs/journeys/web-components), a custom HTML element that renders in Shadow DOM.

:::info Beta

The SDK is in beta. Test it before rolling out to production. Existing embeds using the [legacy `__epilot` script](./embedding) continue to work.
The SDK is in beta. Test it before rolling out to production. Existing embeds using the [legacy `__epilot` script](/docs/journeys/embedding) continue to work.

:::

:::tip When to use the SDK

For iframe embedding, the SDK is the new default. It replaces the legacy `__epilot` script.

For web components, use the SDK or drop the [`<epilot-journey>`](./web-components) element directly into your HTML, whichever fits your integration.
For web components, use the SDK or drop the [`<epilot-journey>`](/docs/journeys/web-components) element directly into your HTML, whichever fits your integration.

:::

Expand Down Expand Up @@ -698,7 +698,7 @@ When you embed with `.asIframe()`, `.contextData()` values are forwarded to the

## Content-Security-Policy (CSP)

The SDK uses the same script origin as the Web Component embed. See the [Web Components CSP guide](./web-components#content-security-policy-csp) for the required policy directives.
The SDK uses the same script origin as the Web Component embed. See the [Web Components CSP guide](/docs/journeys/web-components#content-security-policy-csp) for the required policy directives.

## Migrating from the Legacy `__epilot` API

Expand Down
6 changes: 3 additions & 3 deletions docs/journeys/web-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ All attributes are set as standard HTML attributes on the `<epilot-journey>` ele

:::tip Accessible name

The standard HTML `title` attribute works on `<epilot-journey>` and is exposed to screen readers. If you embed via the [Journey Embed SDK](./sdk), use `.name(value)` — it sets `title` on the element for you.
The standard HTML `title` attribute works on `<epilot-journey>` and is exposed to screen readers. If you embed via the [Journey Embed SDK](/docs/journeys/sdk), use `.name(value)` — it sets `title` on the element for you.

:::

Expand Down Expand Up @@ -270,7 +270,7 @@ document.querySelector('epilot-journey').refresh()

## Events

The `<epilot-journey>` Web Component dispatches custom events on the `window` object that you can listen for. The event names are the same as the iframe `postMessage` events used by the [iframe embed script](./embedding), so you can use the same event names regardless of the embedding method.
The `<epilot-journey>` Web Component dispatches custom events on the `window` object that you can listen for. The event names are the same as the iframe `postMessage` events used by the [iframe embed script](/docs/journeys/embedding), so you can use the same event names regardless of the embedding method.

### Event Reference

Expand Down Expand Up @@ -371,7 +371,7 @@ To load a different Journey, update the attributes on the existing element rathe
</script>
```

If you need multiple Journeys visible simultaneously, use the [iframe embedding](./embedding) approach instead.
If you need multiple Journeys visible simultaneously, use the [iframe embedding](/docs/journeys/embedding) approach instead.

## Content-Security-Policy (CSP)

Expand Down
Loading