How to Set Priority When Multiple Videos Match the Same Product
Control which shoppable video shows first when multiple videos tag the same product. Use data-bn-priority, pin videos, and preset ordering.
When multiple videos are tagged to the same product, beyondRegular picks the top video by preset order first, then by explicit priority, then by recency. You override the pick with the data-bn-priority attribute on the embed div, a pinned-video toggle in the dashboard, or by reordering videos inside the preset.
How the default order is decided
Every widget resolves videos in three passes. First, the preset filter runs (products, collection, page URL, tags). Second, videos are sorted by the priority value stored on each video, higher wins. Third, ties break by publish date, newest first.
If you never touch priority, the newest matching video for a product shows in slot one. That is fine for most stores, but it means a fresh unboxing clip can bury a proven best seller demo. Set priority explicitly when a specific video needs the top slot on a PDP or landing page.
Override with data-bn-priority on the embed
Add data-bn-priority to the embed div to force a specific video ID into position one for that placement. This wins over dashboard priority and recency.
```html <script async src="https://www.itsbeyondregular.com/embed.js"></script> <div data-bn-preset="PRESET_ID" data-bn-priority="vid_9f2a,vid_7c31" data-bn-product="{{ product.id }}" ></div> ```
The list is comma separated. Video IDs are read left to right, so vid_9f2a fills slot one, vid_7c31 fills slot two, and the rest of the preset fills below. Unknown IDs are ignored silently, they do not break the widget.
Set priority in the dashboard
Go to Dashboard, Videos, click the video, open the Placement tab. Set the Priority field to any integer from 0 to 100. Higher wins. Save.
For a store-wide pin without editing theme code, go to Dashboard, Presets, open the preset, click Reorder. Drag the video to the top. The order you set here is the fallback used by every embed that does not specify data-bn-priority.
On Shopify, the theme app embed toggle picks up the new order on the next page load. No redeploy needed. Clear your browser cache if you still see the old order.
Per-product pinning for PDPs
To pin a different hero video on each product page, use the product ID pattern with data-bn-priority-map. The widget matches the current product against the map and picks the pinned video.
```html <div data-bn-preset="pdp_carousel" data-bn-product="{{ product.id }}" data-bn-priority-map='{"gid://shopify/Product/1234":"vid_9f2a","gid://shopify/Product/5678":"vid_7c31"}' ></div> ```
The JSON must be single quoted on the outside so Liquid does not fight the double quotes inside. If the current product is not in the map, the widget falls back to preset order.
Troubleshooting priority not applying
Ranked by how often we see it: (1) Two embed divs on the same page share a preset but disagree on data-bn-priority. The first one that renders wins the cache for that session. Give each placement its own preset ID. (2) The video is not actually tagged to the product, so the filter drops it before the priority pass runs. Open the video in Dashboard, Videos, Tags and confirm the SKU is attached. (3) A stale embed.js is cached by Cloudflare or the theme. Bump the placement by re-saving the preset, which busts the version query on embed.js.
Common questions
Does data-bn-priority work on the floating bubble and reel feed formats?
Yes. The attribute is read by embed.js before format specific rendering, so horizontal carousel, vertical carousel, floating bubble, and reel feed all honour it. On the floating bubble the priority list decides which video autoplays when the bubble opens. On the reel feed it decides the first frame in the scroll stack. The only case where priority is ignored is when the preset filter itself excludes the video, for example the video is not tagged to the current product or the preset is scoped to a different collection.
What happens if two videos have the same priority value?
Ties break by published date, newest first. If publish dates also match down to the second, which is rare, the video with the lower internal ID wins. If you need deterministic order without leaving it to timestamps, give every pinned video a unique priority value, for example 90, 80, 70 instead of all set to 100. This also leaves headroom if you later want to slot a new video between two existing pinned ones without renumbering everything.
Can I change priority without touching theme code?
Yes. Go to Dashboard, Presets, open the preset, click Reorder, and drag videos into the order you want. Save. Every embed div that points at that preset ID picks up the new order on the next page load. This is the recommended path for merchants on Shopify who enabled the theme app embed toggle, since you never redeploy the theme. Use data-bn-priority in code only when a single placement needs to override the shared preset order, for example one specific landing page.