Goals
Choose the action you want more visitors to take, such as buying a product or signing up. This is your goal: it tells Version Compare what to optimise for. Only versions a visitor actually saw receive credit when they complete it.
Open your site's Goals tab, give the goal a useful name, and start with All site version sets. After your versions have been found, you can limit a goal to one set.
Page visit
Use a page goal when an action ends on a particular page, such as a purchase confirmation. Reaching that page counts towards the versions the visitor saw earlier, even if those versions were on another page.
Enter /thanks, checkout/thanks, or an address such as checkout.example.com/thanks. You can omit the scheme from an address. A relative path uses an allowed website, never this admin page. Choose the website when more than one is allowed. Start a dotted filename with / or ./ to keep it relative.
The destination must use your chosen integration, even if it has no versions of its own. Page loads and history-based page-path changes count; submitting a form alone does not. Query strings and fragments are ignored, so /thanks?order=123#receipt matches /thanks.
Named interaction
Use an interaction goal when the action happens on the page, such as opening delivery details. Mark the button or link that performs it; you do not need a separate confirmation page.
Create an interaction named show-details and put the same name in data-vc-goal on the actual button or link:
<button type="button" data-vc-goal="show-details" popovertarget="delivery">
Delivery details
</button>
<div id="delivery" popover>
<p>Delivery takes three to five working days.</p>
<button type="button" popovertarget="delivery" popovertargetaction="hide">
Close
</button>
</div>This counts opening the delivery details, not completing a purchase. Clicks and keyboard activation work, and the button or link keeps its normal action.
One goal for many items
A catalogue can have many products with the same Add to cart action. Use one goal for the whole catalogue, with product IDs to keep each product's results separate.
Create one interaction named add-to-cart for all site version sets. Group each product's versions and button under its public product ID:
<article data-vc-item="coffee-123">
<section data-vc>
<p data-vc-version>Freshly roasted beans</p>
<p data-vc-version hidden>A richer morning ritual</p>
</section>
<button type="button" data-vc-goal="add-to-cart">Add to cart</button>
</article>The nearest data-vc-item wrapper supplies the ID. An external button can carry the same attribute itself. Product A's button credits only observed versions for A. Use public product IDs, never customer identifiers.
Only a version actually observed can receive credit, at most once for a saved choice. There is no time limit. For journeys between websites or tabs, read Allowed websites.