# How stories work

> What a story is, where it is shown, who sees it, when it stops showing, and how impressions, clicks, conversions and purchases are counted.

A **story** is a full-screen, tap-through set of up to 20 slides that the Releva SDK opens on one page of your shop, in the style of a social-media story. You build stories under **Personalization › Stories**; the SDK on your storefront shows them. This page explains the rules Releva applies between the two. For the clicks, see [Create a story](https://releva.ai/documentation/guides/stories/create-a-story/) and [Check how a story performs](https://releva.ai/documentation/guides/stories/check-how-a-story-performs/).

## One story, one page, one segment

Every story belongs to exactly one Personalization **page** and one **Behavioral segment**. Both are required before you can save. A second segment, the **Profile filter**, is optional and is evaluated in real time from the visitor’s current attributes; **And** / **Or** says how the two combine, and **Action** (**Show** / **Hide**) says whether members of the behavioral segment are the audience or the exclusion.

The story’s name must be unique on its page. The same name on another page is fine.

A story is sent to the storefront together with the product blocks and banners of its page when the SDK pushes that page. The page is matched by its token or by the URL, the same way as for product blocks. Read [How segments work](https://releva.ai/documentation/learn/segments/how-segments-work/) for how the segment is evaluated.

## When a story is shown

The SDK receives a story only when all of these hold:

| Rule                                                                                                        | Where you set it               |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------ |
| The story is **switched on** (the switch on its card). New stories are saved switched off.                  | Stories list                   |
| The visitor is in the audience (behavioral segment, **Action**, **Profile filter**).                        | **Audience** tab               |
| Now is inside **Show when**, if you set a start or end. A story past its end shows **Expired** on its card. | **Audience** tab               |
| The page URL passes the **URL filter**, if you turned it on.                                                | **Display** tab                |
| The shop language is in **Locales to display**, or the list is empty.                                       | **Display** tab                |
| With **Show until click**: the visitor has not clicked or closed this story yet (see below).                | **Audience** tab               |
| The visitor is not a bot, and is not in the control group of an A/B test.                                   | automatic                      |
| If your page tag sends block tags, the story has one of them.                                               | **Tags** on the **Slides** tab |

Once the story has arrived, the SDK decides *when* to open it from the **Trigger**: **Show immediately**, **On scrolling down N% of page** (**Show after % scroll**), **After N seconds on the page** (**Show after seconds**), **On leave intent** (optionally **Also trigger on mobile Back button**), **Added to Wishlist** or **Added to Cart**.

## Show always versus Show until click

* **Show always**: the story is offered on every qualifying visit.
* **Show until click**: once the visitor clicks a slide link or closes the story, Releva remembers it for that device and stops sending the story. By default the memory lasts 365 days (**Never show again to this user**). With **Show again after cooldown**, it lasts the number of days and hours you enter after the last click or close, and then the story is offered again.

The memory is per device, not per profile: the same person on another device sees the story again.

## Slides, timing and end behavior

Each slide is built in the Releva builder, saved as HTML, and shown for **Auto-play duration (seconds)** (1 to 60, default 5) unless the slide has its own **Duration override (seconds)**. Slide HTML is personalised with merge tags from the visitor’s profile before it is sent, and every trackable link in a slide gets a `rlv_stid` parameter that carries the story’s token, so a later cart add or order can be attributed to the story.

**End behavior** says what happens after the last slide: **Dismiss** closes the story, **Loop** restarts it, **Stay on last** pauses on the last slide until the visitor closes it. **Progress indicator color** sets the **Active color** and **Inactive color** of the bars at the top.

## What is counted

The SDK sends one event for each thing a visitor does with a story. Releva turns them into the numbers on the card and the Statistics page:

| Visitor action               | Event                       | Shown as                                    |
| ---------------------------- | --------------------------- | ------------------------------------------- |
| The story opens              | `storyImpression`           | **Impressions**                             |
| A slide is displayed         | `storySlideView`            | **Slide Views**                             |
| A link in a slide is clicked | `storySlideClick`           | **CTA Clicks** (card) / **Clicks** (chart)  |
| The last slide finishes      | `storyComplete`             | **Completions** (chart and export)          |
| The visitor closes the story | `storyClose`                | **Closes** (chart and export)               |
| A cart add after a click     | your shop’s cart-add action | **Conversions**                             |
| An order after a click       | your shop’s purchase action | **Purchases**, and its value as **Revenue** |

Only a **click** attributes the visitor to the story. Impressions and slide views do not, so a story nobody clicks has no conversions however many people see it.

The two screens count differently:

* The **card** on the Stories list sums **events** for the period (default last 30 days). Its grey percentages are shares of the previous metric, so **Slide Views** per impression is often above 100%.
* The **Statistics** page counts **unique profiles per day** (default last 7 days). Its numbers are lower than the card’s for the same period.

**Export** on the list downloads the same metrics plus **Completions** and **Closes** per story.

## Editing, copying and deleting

Opening a story shows the same four tabs with **Save**, **Delete** and **Make a copy** on every tab. **Save** replaces the slides with what is on the **Slides** tab, so a slide you removed is gone after saving. **Make a copy** opens a new, unsaved story named “Copy of …” with the same slides; give it a unique name on its page and select **Save**. **Delete** asks **Are you sure?**, then removes the story and its slides; its past events stay in your event data.

## Next steps

* [Create a story](https://releva.ai/documentation/guides/stories/create-a-story/): Build a tap-through story, choose its page and audience and switch it on.
* [Check how a story performs](https://releva.ai/documentation/guides/stories/check-how-a-story-performs/): Read impressions, clicks, purchases and revenue for a story.
* [Stories in the SDK](https://releva.ai/documentation/reference/sdk/endpoints-the-releva-sdks-call/#stories-in-the-push-response): Render stories yourself from the page push response.
* [How segments work](https://releva.ai/documentation/learn/segments/how-segments-work/): Build the audience a story is shown to.