The implementation of Videowise
with Headless Shopify includes Scripts initialization (Adding Videowise
scripts to the website)
Script Initialization
To add scripts to your website, insert the following code before the closing body tag.
<script>
var SKIP_CART=true;
var FORCE_DOMAIN = true;
var VIDEOWISE_FAST_INLINE_VIDEO_PLAYER = true;
var Shopify = {
shop: 'shop-name.myshopify.com', currency:{active:’USD’, rate:’1.0’}
};
var __st = {
rid: null,
p: 'home'
};
</script>
<link rel="stylesheet" as="style" onload="this.onload=null;this.rel='stylesheet'" href="https://assets.videowise.com/style.css.gz" id="videowise-style-css">
<script defer="" src="https://assets.videowise.com/vendors.js.gz" id="videowise-vendors-js"></script>
<script defer="" src="https://assets.videowise.com/client.js.gz" id="videowise-client-js"></script>
shop-name.myshopify.com - replace this with your shopname
The __st
variable above must be set like this:
var __st = { rid: null, p: 'home' };
→ for all pages which are not PDP
var __st = { rid: $rid, p: 'product'};
→ for PDP pages
You will need to change $rid
with the product id.
When adding scripts to a website, it's recommended to verify their correct implementation. You can do this by navigating to the DevTools
⇒ console tab. Use the shortcut Command + Option + J
on a Mac, or Control + Shift + J
on other systems.
If you see the log below, it indicates that the Videowise scripts have been added correctly.
At this stage, Videowise is ready for use and you can add a widget to your website.
If you encounter any issues, such as a lack of fields to paste the copied code from the app, we recommend contacting the developer's team. You could request code implementation or a workaround for the automation framework.