Shopify

Ask your agent to inspect the Shopify theme and find the link or button visitors use. Keep the original control so the theme still handles styling, focus, and cart behaviour. Have the merchant approve a draft preview before you publish.

Mark a storefront control

If success is reaching a storefront page such as the cart, use a page goal for its actual path, provided it runs Version Compare. To measure a click instead, ask your agent to configure a Named interaction. See Goals.

Work in a duplicate theme. With permission to edit theme code, go to Online Store > Themes, open the draft theme's menu, and choose Edit code. Inspect the control in the browser to find the Liquid section or snippet that renders it.

For example, configure an interaction named choose-checkout. In Shopify's Dawn theme, add data-vc-goal="choose-checkout" to the existing <button id="CartDrawer-Checkout"> in snippets/cart-drawer.liquid. The attribute must match the event name exactly. Keep the button's name, form association, and disabled state. This goal measures activation of the storefront button. It does not confirm a checkout or an order.

This setup covers storefront controls, including cart pages and drawers. Storefront theme code does not mark controls inside Shopify's hosted checkout. Shopify has separate checkout tools for that part of the journey.

Keep the marker after cart updates

Themes can replace sections without reloading the page through Shopify's Section Rendering API. A marker in the Liquid that renders the button comes back with the new HTML. If the theme generates the button in JavaScript instead, add the marker in the theme asset that renders the drawer. For example, after the update, select #CartDrawer button[name="checkout"] if that matches your theme and set data-vc-goal on that button. If there is no render hook, watch a stable parent that survives replacement. Do not add a second click handler or embed.

Compare wording in Liquid

Keep the original theme setting for the fallback. In Dawn's sections/image-banner.liquid, the first link in the Buttons block uses button_label_1. Add a text setting with ID button_label_1_alt to that block's existing settings array. Use Alternate first button label as its label so the merchant can edit both wordings in the theme editor.

Add data-vc to the existing first <a> and replace only its label output with:

<span data-vc-version>{{ block.settings.button_label_1 | escape }}</span>
{% if block.settings.button_label_1_alt != blank %}
  <span data-vc-version hidden>{{ block.settings.button_label_1_alt | escape }}</span>
{% endif %}

Keep the link's existing destination and classes. For a control with icons or status text, mark just its label container instead. Render wording visible on load in Liquid so the fallback is in the initial HTML.

Check the draft theme

Open Preview on the draft theme. Use Show versions to check each label and its focus styles. Open the cart drawer, change a quantity in the preview, and inspect the new button for the exact goal name. For controls you can safely activate in the storefront, look for Version Compare preview: not recorded and the event name in the console. You do not need to enter checkout or place an order.

For first setup or checks on ordinary storefront pages, add data-vc-test with no value to the hosted script tag on every page that uses it. See test mode. Leave the attribute in place until the merchant separately approves turning on measurement. Then remove it and reload the affected pages.