Shopify integration
Integrate Selektable into your Shopify store by adding the embed script and widget button to your product template.Setup
1. Add the embed script
Add the script to your theme’stheme.liquid file, before the closing </body> tag. Replace store_xxx with your Store ID from the Selektable dashboard:
2. Add the widget button
Add the following to your product template (typicallysections/main-product.liquid or similar):
3. Handle variant changes
Update the button data when the customer selects a different variant:The
variant:changed event name depends on your theme. Some themes use variantChange or dispatch custom events. Check your theme’s JavaScript for the correct event name.Order webhooks
To enable conversion tracking, set up an order webhook:- Go to Settings → Notifications → Webhooks
- Create a webhook:
- Event: Order creation
- URL:
https://app.selektable.com/api/webhooks/shopify/orders - Format: JSON
Troubleshooting
Schema validation error: Invalid URL for imageUrl or productUrl
Schema validation error: Invalid URL for imageUrl or productUrl
This happens when Shopify’s Liquid filters produce incomplete URLs:
image_urlreturns protocol-relative URLs (//cdn.shopify.com/...). Always append| prepend: 'https:'after theimage_urlfilter.product.urlreturns a relative path (/products/...). Prependshop.urlto produce a full URL:{{ shop.url | append: product.url }}.featured_imagecan benilif a variant has no image. Use thedefaultfilter to fall back to the product’s featured image:product.selected_or_first_available_variant.featured_image | default: product.featured_image.