Shopify
A “Try it in AR” button on products with a Custom Liquid block.
- In Settings › Custom data › Products add a metafield with the key dimenzum.project (single line text).
- On the product fill in the project identifier, e.g. glasses-summer (the last part of the experience link).
- Online Store › Themes › Customize › product template › Add block › Custom Liquid.
- Paste the code from the studio (Share tab › Shopify) and save.
{%- assign dimenzum = product.metafields.dimenzum.project.value -%}
{%- if dimenzum != blank -%}
<script src="https://YOUR-DOMAIN/embed.js" async></script>
<div data-dimenzum="{{ dimenzum | escape }}" data-label="Try it in AR"></div>
{%- endif -%}Products without the metafield show no button, so you can put the code in the template for all products.