The wisepops()  function let you give instructions to WisePops, even before WisePops is loaded on your website. Usually, this wisepops()  function is created when our tracking code is executed. When WisePops has been installed through our Shopify app, you will need to write a Javascript snippet to enable it.

Please follow these steps:

  • Go to your shop admin interface
  • Click on Online Store > Actions > Edit code

  • Go into the Snippets folder, and create a snippet named wisepops.liquid . Use the existing one if any. We encourage you to write all the code that is related to WisePops into this file, it helps keeping things sorted.
  • Copy/paste the following snippet at the beginning of the file, and save it:
<script>
  /**
   * Enable wisepops() function
   */
  if (!window['WisePopsObject']) {
    window['WisePopsObject'] = 'wisepops';
    window['wisepops'] = window['wisepops'] || function () {
      (window['wisepops'].q = window['wisepops'].q || []).push(arguments)
    };
    window['wisepops'].l = 1 * new Date();
  } else {
    window['wisepops'] = window[window['WisePopsObject']];
  }
</script>
  • You now need to include this snippet into your theme. Go to the Layout folder at the really top of the file list, and open the theme.liquid  file.
  • At the end of the file, before </body>, copy/paste the following line, and save:
{% include 'wisepops' %}


You should now be able to use the wisepops()  function on your website, as long as it is executed after the snippet you created.

Did this answer your question?