Enjoy a Free bottle of our 1000mg CBD cream ($49.95 Value) with any purchase. Add our 1000mg CBD Cream (Not Sports Cream) to your cart with your selected products and use code “FreeCBDCream” at checkout.
You're absolutely right to want dynamic video markup! Manually hardcoding values defeats the purpose and won't scale.
To make the Shopify video markup dynamic, we need to leverage Shopify's Liquid templating language to pull information directly from your store's data.
Below are common scenarios for videos on Shopify and how to make the VideoObject schema dynamic for each.
Scenario 1: Video as Product Media (Preferred Shopify Method)
If you've uploaded videos directly to your product media or added YouTube/Vimeo embeds through the product media section in your Shopify admin, this is the most robust and dynamic approach.
Where to place this code:
You'll typically place this in a file related to your product page, such as:
sections/main-product.liquid
sections/product-template.liquid
snippets/product-media.liquid (if your theme uses a snippet for media handling)
Or directly in templates/product.liquid if your theme isn't sectioned.
The Dynamic JSON-LD (within your product page template):
Code snippet
Choosing a selection results in a full page refresh.