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

# Connect your store pages

> Add the script and the offer tag to the upsell and downsell pages of your store funnel.

Your upsell and downsell pages stay yours, served from your own domain. The platform drives the funnel from inside them with one script tag and one offer tag per product. The offer tag draws the whole offer for you: product image, name, a selector for each option, price and the buy button.

## 1. Add the script to your upsell and downsell pages

Paste this as the last element before the closing `</body>` tag, on **every upsell and downsell page** of the funnel:

```html theme={null}
<script src="https://scripts.pagamerican.app/s.js"></script>
```

Nothing works without it. The script loads the offers, charges the one the buyer accepts and moves the buyer to the next step. The same line, with a **Copy** button, appears below the products of each step in the editor.

> [!WARNING]
>
> **Don't add the script to the thank-you page.** With the script on it, the page shows a "You are not allowed to continue" notice to every buyer who finished the funnel.

## 2. Place the offer tag

Paste the tag where the offer should appear on the page:

```html theme={null}
<pag-offer product="prd_example1234"></pag-offer>
```

Copy it from the product's card in the step, with the **Copy** button: it comes with the right product filled in. Place one tag for each product of the step. Several tags on the same page sit side by side, and the buyer can accept only one of them.

* **Keep the closing tag.** Write `<pag-offer ...></pag-offer>`, never a self-closing `<pag-offer ... />`.
* **The tag is the buy button.** You don't need `data-pag-yes` or `data-pag-offer` on a store funnel page.
* **Leave the tag as it is.** Don't add attributes to it, and don't place it inside an element that carries `data-pag-yes` or `data-pag-no`.
* **You choose the place and the width.** The offer brings its own look, and your page's CSS doesn't change what is inside it. It takes between 240 and 400 pixels of width.

## 3. Mark the "No thanks" link

Put `data-pag-no` on the link the buyer clicks to decline. It leads to the next step without a charge. Only its presence counts, and it carries no product.

```html theme={null}
<a data-pag-no style="cursor: pointer">No thanks</a>
```

Leave the link without `href` and add `cursor: pointer`, so it looks clickable. A buyer who clicks an `<a href>` before the page finishes loading leaves the page instead of declining.

## The page, ready to copy

```html theme={null}
<!-- Where the offer should appear: one tag per product of the step -->
<pag-offer product="prd_example1234"></pag-offer>

<!-- The decline link -->
<a data-pag-no style="cursor: pointer">No thanks</a>

<!-- Last element before </body> -->
<script src="https://scripts.pagamerican.app/s.js"></script>
```

Swap `prd_example1234` for the tag you copied from the step.

## What the offer shows

* **Only the variants you selected in the step.** Each option lists only the values that still have a variant for the choices the buyer made, so a combination you don't sell never appears. An option with a single value comes already selected.
* **Chips or a list.** An option with a few short values shows them as chips. Otherwise it shows a list, such as "Select size".
* **The price.** Until the buyer picks every option, the offer shows "From" and the lowest price, and the button reads **Accept Offer**. Clicking it then points to the missing option, for example "Select a size to continue", and charges nothing.
* **The final price.** Once every option is picked, the offer shows the variant's price and the button reads **Accept Offer · \$49.00**. When the variant has a higher compare-at price in Shopify, the offer shows it struck through, with how much the buyer saves.
* **The step discount.** When the step has a discount, the price is the discounted one and the variant's full price shows struck through. In place of how much the buyer saves, a green label shows the discount, such as "15% off" or "\$10.00 off". The label also shows under "From" before the buyer picks every option. The button carries the discounted price, which is what the buyer pays.
* **Font.** The offer uses the DM Sans font, which it loads from Google Fonts.

To see what happens when the buyer clicks, read [What the buyer sees](https://docs.pagamerican.app/sales-funnel/how-it-works.md#what-the-buyer-sees).

## The domain has to match exactly

Each page must be served from the same domain you entered in the step's **Page URL**. `www.yourstore.com` and `yourstore.com` are different domains here, and a page whose domain does not match cannot charge the buyer.

## Test it end to end

Opening a funnel page directly in the browser shows a notice instead of your content, and the offer does not appear. That is expected: the page only runs when the buyer arrives from the checkout.

To test for real, make sure the funnel is published in the editor and published to your store. Then, as a buyer, add a product to the cart in your store, click the checkout button, pay on the PagAmerican checkout and follow the flow. A test purchase is a real purchase: it charges the card you use, so refund it from the order afterwards.

Use a **different email for each test purchase**. The checkout accepts one purchase of the same cart, with the same products and quantities, per email per day (UTC): a second one shows "Purchase already completed" and charges nothing, so it never reaches your funnel.

<video autoPlay muted loop playsInline src="https://mintcdn.com/pagamerican/LOuYpZQOKvBDa_ib/videos/sales-funnel/test-store-purchase.mp4?fit=max&auto=format&n=LOuYpZQOKvBDa_ib&q=85&s=2f50b82eb1d9c49d6e53e224f7552ffd" />

A test purchase from the store cart that lands on the upsell page

## Next step

> [card] [How it works](https://docs.pagamerican.app/sales-funnel/how-it-works.md)
>
> What the buyer sees on each click, how funnel purchases are charged and how they reach your Shopify order.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.