How to show the offer in a custom position
Overview
The offer shows on the product page of product X. By default it places itself below the product form or below the product section, depending on the offer layout. To choose the position yourself, add the Buy X Get Y & BOGO app block in the theme editor, or paste a code snippet in your theme or page builder.
When the page has the app block or the code snippet, the offer shows there instead of in its default position.
Before you start
- Turn on the Xboost Free Gift app embed. See How to enable the app embed.
Use the app block
1. Add the Buy X Get Y & BOGO block
- In your Shopify admin, go to Online Store > Themes and click Customize.
- At the top of the theme editor, open your product template.
- In the left sidebar, click Add block in the Product information section.
- Open the Apps tab and select Buy X Get Y & BOGO from XB: Free Gifts & BXGY. To find it faster, type the app name in the search box.

If you also use XB: Bundles Quantity Breaks, the list shows two blocks with the same name. Pick the one with XB: Free Gifts & BXGY under the name.
2. Set up the block
Click the block in the left sidebar to see its settings:

| Setting | What it does | Default |
|---|---|---|
| Link to featured product (optional, only for featured products) | Shows the offer of the product you select. Use it when the block is in a featured product section on another page, such as the home page. Leave it empty on product pages. | Empty |
| Show example | Shows a sample offer in the theme editor when the product has no offer, so you can see the block. Shoppers never see the sample. | On |
| Margin Horizontal | Space above and below the offer, from 0 to 120 px. | 16 px |
3. Move the block and save
- Drag the block to the place you want, for example above the product title.
- Click Save in the theme editor.
The offer shows where you placed the block. In this example the block is above the product title, and the theme editor shows the sample offer:

Use the code snippet
Use the code snippet with a page builder or when you edit theme code.
- Open Offers, click the offer name, then click Offer.
- Below Pricing setting, copy the code under Use this code for custom placement or page builders (Optional).

- Paste the code in your product page template or page builder where the offer should show:
<div id="xb-buy-x-get-y-v2-root"></div>
Use the snippet once per page. The code is the same for every offer: the app shows the offer of the product on that page.