Skip to main content

Custom store setup

A custom store lets you integrate Selektable with any ecommerce platform, whether you built it yourself, use a headless CMS, or run a platform we don’t have a native integration for. Unlike WooCommerce or Shopify stores that connect via OAuth, custom stores are configured manually through the dashboard and integrated using the embed script.

Step 1: Create a store

  1. Log in to the Selektable dashboard
  2. Navigate to your organization
  3. Click Add Store
  4. Fill in the details:
  1. Click Create Store

Step 2: Create a widget

Each store can have multiple widgets. You need at least one to get started.
  1. Open your store in the dashboard
  2. Click Add Widget
  3. Configure:
  1. Click Create Widget
  2. Copy the Widget ID (e.g., widget_abc123)

Step 3: Add the embed script

Add the Selektable script to every page where you want the widget available. Place it before the closing </body> tag. Replace store_xxx with your Store ID from the dashboard:
The script is lightweight and loads asynchronously, so it won’t block your page rendering.

Step 4: Add the widget button

Call Selektable.open() with your product data:

Option B: data attributes

Use HTML data attributes for declarative setup:
When using data attributes, Selektable.discover() registers the elements but doesn’t create iframes until Selektable.open() is called. You still need to call open() from a click handler or trigger.

Step 5: Add cart integration (optional)

If you want customers to add products to their cart from the visualization result screen, provide cart callbacks:
If cart is enabled on your widget but you don’t provide onAddToCart, the widget will show an error when the customer tries to add to cart.

Step 6: Set up order webhooks (optional)

To track conversions, send order data to Selektable when a purchase is made:
This enables conversion attribution in your analytics dashboard.

Step 7: Identify customers (optional)

If your site has user accounts, associate the visitor with their user ID for better tracking:
See Identity Tracking for details.

Full example

Here’s a complete product page integration:

Troubleshooting

Make sure the embed script has loaded before calling Selektable.open(). The script loads asynchronously, so if your button fires before the script is ready, Selektable will be undefined. Wrap your call in a check:
Ensure you’re passing productId and at least one image in productImages or productImage. The widget needs product data to generate a visualization.
If cart is enabled on the widget, you must provide an onAddToCart callback. Without it, the widget will show an error when the customer tries to add to cart.
The product images must be publicly accessible URLs. If they’re behind authentication or on a different CDN with restrictive CORS, the widget won’t be able to load them.