Guides

How to Add Virtual Try‑On to Shopify (Step by Step)

Key takeawayTo add virtual try-on to Shopify, upload your product photos to a try-on platform using each variant's SKU as the file name, then paste one script tag into your product template that passes the current SKU. A "Try it on" button appears on every product that has a try-on, and Buy now can add the product to the cart.

What you’ll end up with

A “Try it on” button on every Shopify product page that has a try-on. Shoppers tap it, allow the camera and see the product on themselves — then tap Buy now to add it to their cart. Products without a try-on simply don’t show the button.

Time needed: about 15 minutes for the first product.

1. Create your TryItOnMe store

Start a free trial — 14 days of the Pro plan, unlimited products, no card. Your store gets an id (for example my-store) that the snippet uses.

2. Upload products with the SKU as file name

In Upload, pick the category (for example Glasses & sunglasses or Ring) and drop in your product photos. Name each file after the variant SKU in Shopify — RING-SOL-01.jpg — so the try-on matches the right product. You can drop a whole folder at once; backgrounds are removed automatically.

Tip: in Shopify, SKUs are under Products → [product] → Variants → SKU. If your products have no SKUs yet, add them first — they’re the link between Shopify and the try-on.

3. Check the fit

Open each product in the dashboard to see it on a reference hand or head. Adjust size or position if needed and save.

4. Paste the snippet into your theme

In the dashboard, open Integration and copy the Shopify snippet. In Shopify go to Online Store → Themes → … → Edit code, open your product section (often sections/main-product.liquid) and paste it where you’d like the button — usually just above the buy buttons:

<script
  src="https://app.tryitonme.com/integrations/tryon_api.js"
  onload="loadTryOnButton({
    company: 'my-store',
    psku: '{{ product.selected_or_first_available_variant.sku }}',
    page: 'product',
    buynow: { enable: 'true' },
    prependButton: { class: 'product-form' },
    tryonButtonData: { text: 'Try it on' }
  })"></script>

The Liquid tag passes the current variant’s SKU, so one snippet works for every product. Save, then open a product page — the button appears.

5. Make Buy now add to cart

When a shopper taps Buy now in the try-on, the script fires a tryitonme:buynow event with the SKU. Set buynow.productIdShopify to add the product to the Shopify cart directly, or use your own buynowCallback to open your cart drawer.

Every product also has a link like app.tryitonme.com/tryon/my-store/RING-SOL-01. Add it to Instagram stories, your TikTok bio or WhatsApp replies — it opens straight into the try-on.

FAQ

Is there a Shopify app? Not yet — the snippet is all you need, and there’s nothing to install or update. (On WooCommerce there is a plugin; see integrations.)

Will it slow my store? The script on your page only checks which products have a try-on and places the button. The try-on itself loads only when someone taps it.

Which products work? Glasses and sunglasses, rings, earrings, necklaces, bracelets, watches, makeup, hats, wigs and coloured contact lenses — and clothing through AI photos. See all categories.

You have nothing to lose. Try it on your products today.

Start with 14 days of Pro, free and with no card. After that, stay on the Free plan for as long as you like — every product included, never charged per product.

14 days of Pro · no card · then Free, unless you choose a plan