Skip to main content

Integrate your widget on Shopify

Written by Snackeet Team

Requirements :

  • Have a Shopify subscription

  • Have the rights to create a section

It is only possible to add your widget to the Section section of Spotify at the moment.

If you are using Pagefly, the tutorial for adding html code can be found at this link and at this link for Shogun.

INTEGRATE IN A BLOCK

Integrate the widget in a block

1/ Go to your Shopify theme

2/ Then, go to the section and click on "Add Block"

3/ Then select Custom liquid :

4/ Once the block is added, you just have to integrate the Embed code of the widget.

If you need to use Dynamic Alias please use the code below and use a dynamic variable such as {{product.title}}

<!-- Snackeet --> <script> var currentScript = document.currentScript; var widgetScript = document.createElement('script'); widgetScript.src="https://widget.snackeet.com/script.js"; widgetScript.defer = true; widgetScript.dataset.snktProjectId="YOUR_PROJECTID"; widgetScript.dataset.snktDynamicAlias="{{product.title}}";
currentScript.insertAdjacentElement('afterend', widgetScript); </script> <!-- End Snackeet -->

5/ Drag and drop the bloc wherever you want on the product page.

6/ Save and refresh the page to see it appears.

Depending on your version of Shopify, you may not see the widget, so you will need to click Preview to see the rendering.

To know: You will be able to modify the content of your widget without having to redo the above mentioned manipulations!

Did this answer your question?