Integrating Loox into pages hosted outside of Shopify
Loox automatically integrates codes into your Shopify store's theme when you install the app.
If you wish to display Loox on other places outside your Shopify store (eg. Click funnels, Blogs, headless commerce etc...) follow the steps below:
To embed a Loox widget into an external page, please follow these instructions:
- Head over to the HTML code of the page you'd like Loox to appear on
- Copy the following script:
<script async src="//loox.io/widget/loox.js?shop=STORE.myshopify.com"></script>
- Paste the script at the bottom of the HTML’s body, above the </body> tag
- Replace the STORE.myshopify.com with the store's myshopify.com domain
Please make sure there are no extra spaces in the code (especially between the shop= and the .myshopify URL) - Integrating a widget:
- To integrate a product's reviews widget, copy the following code:
<div id="looxReviews" data-product-id="XXXXXXXXXX"></div>
- To integrate a product's star
ratings widget, copy the following code:
<div class="loox-rating" data-fetch data-id="XXXXXXXXXX"></div>
- To integrate a widget that displays all your store's reviews use the code below:
<div id="looxReviews" data-loox-aggregate></div>
- To integrate a product's reviews widget, copy the following code:
- Paste the code where you'd like the widget to appear
- Replace the XXXXXXXXXX with the ID of the product that you'd like to display reviews for.
For help, read "How do I find a product's ID?". - Save the HTML code
In order for the page to appear, you must whitelist the domain the widget will appear on through your Loox settings:
Learn how to add domains to the Allow-list
Other Widgets:
You can also implement other widgets like the Popup, Sidebar, and Carousel on pages outside Shopify using the codes below:
Popup Widget - about
<script> var loox_pop_active = true; var loox_pop_display = {"other_pages":true}; </script>
Carousel widget- about
<div id="looxCarousel" data-show-more="true"></div>
Sidebar widget - about
<script> var loox_floating_widget = { "active":true, "display_on_other_pages":true, "position":"left", "button_text":"Reviews", "button_bg_color":"333333", "button_text_color":"FFFFFF", "hide_on_mobile":false }; </script>
The Sidebar settings can be configured within the code as below:
- "position" - Decide which side of the screen the Sidebar widget appears on.
- "button_text" - Change the default "Reviews" title.
- "button_bg_color" - Adjust the color of the widget's background.
- "button_text_color" - Pick the color of the Sidebar's title.
- "hide_on_mobile" - Removes the Sidebar from appearing on mobile devices.
If you need any assistance editing your liquid code, feel free to contact our Partner Support team at [email protected], and we’d be more than happy to help!