How can I enable Socket IO in my web development project?

5 0 2



I'm trying to develop a small snippet using Socket IO and webhooks, but I'm not sure how to enable Socket IO in Shopify.

The code itself is:


    <!-- Standard (aka async) embed -->
    <script src="" async></script>
    <script src="" async></script>
    <!-- Socket.IO -->
    <script src=""></script>
      window.payloads = [];
      var socket = io();
      socket.on('event', function(payload){
        if ( == Wistia.visitorKey.value()) {
          // Prepend the latest payload to the array of payloads.
// DO FANCY THINGS } }); </script>

I get an error at "var socket = io();"



For more context, the script will be running all the time and "waiting" for the user to interact with the Wistia Player. When ever the Wistia server sends a new payload, the script will do something according to the video, how long the user played,etc...



Reply 1 (1)

Shopify Partner
22 1 3

Did you solve it? Please, share with us. I'm tryin to user Socket IO on app theme extension, but it doesn't work.