How to use 'variant=' parameters in a URL
Last updated: July 4, 2024
Yes, it's possible to make a page dynamic by passing a Variant ID in the URL, which will automatically display the correct variant that a customer was viewing, similar to the functionality on product detail pages (PDPs).
URL Modification:
Modify the URL to include the variant parameter by appending
?variant=followed by the specific variant ID.Example:
https://www.yoursite.com/your-landing-page?variant=12345
Product Component Configuration:
The product component should be set to automatically select the variant that corresponds to the variant ID passed in the URL.
When a visitor accesses the landing page through a URL that includes a variant ID, the product component on the page should automatically display the variant specified by the ID. This ensures that visitors see the exact product variant they were interested in or previously viewed.