Skip to Content

Quickstart

Install the widget code from your Vizbl dashboard on your store's product pages.

Every Vizbl dashboard hands out the same kind of widget code: a script, Vizbl.js, that goes on your site once, and a <vizbl-button> that goes where the button should appear. This page installs it on a product page.

Copy the widget code from your dashboard

Open the dashboard of the product you sell and find the code:

ProductDashboardWhere the code is
Wall ArtWall ArtYour website → Get code
RugsRugsDashboard → Widget code
FlooringFlooringDashboard → Widget code
Core AR & 3DCore ARIntegrations → Install on 3D & AR viewer or AR view
AI Try-OnAI Try-OnYour website → Install on a widget

The first time you open the code, Wall Art, Rugs, Flooring and Core AR ask for your site's domain if your account has none yet. AI Try-On does not ask: add the domain on its Dashboard → Store domain, or in Settings → Domains.

Add the script once

The first part of the code is Vizbl.js. Its data-key holds your publishable key, which is safe to put in your pages. Paste it once for the whole site, in your theme's <head>:

<script async src="https://cdn.vizbl.com/@vizbl/loader/dist/vizbl.js" data-key="pk_live_YOUR_PUBLISHABLE_KEY"></script>

If you sell several Vizbl products, keep one script and put every product's key in its data-key, separated by spaces. See Several products.

Put the button on the product page

The second part is the button. Paste it into your product page template where the button should appear, usually under Add to cart:

<vizbl-button product="rugs" object-id="YOUR_OBJECT_ID">Try rug in scene</vizbl-button>

product says which widget opens. The other attribute tells Vizbl which product of your store this page shows. The dashboard fills in the one it uses: an object id for Rugs, Flooring and Core AR, which names one product, and a SKU for Wall Art and AI Try-On. With a SKU, put your platform's variable in the template, for example sku="{{ product.selected_or_first_available_variant.sku }}" on Shopify, and one button serves every product page. How a button finds the product lists all four ways.

Allow your site and check the button

Your key works only on the hosts in your allowed domains. Add your store's host exactly as the address bar shows it, and localhost while you test.

Open a product page. The button appears once Vizbl has found the product, and opens the widget. If it stays hidden, the browser console says why, for example:

[vizbl] <vizbl-button> is not shown (domain_not_allowed): this domain is not in the key's list of allowed domains.

Hidden buttons lists every reason and its fix.

Next steps

  • Your product's page under Products shows a live demo and the widget code that product hands out.
  • Vizbl.js reference: every attribute of <vizbl-button>, its labels, automatic mode and the hosts your Content Security Policy must allow.
  • To choose the trigger and pass the product's data yourself, install the widget's own package instead: Room Viewer for Wall Art, Rugs and Flooring, Core AR and AI Try-On.

On this page