Q. How can I get my chat widget to work on the Primo VE landing page?

Answer

You can add the code for your chat widget to the homepage_en.html file in your customization package. However, if you have any JavaScript associated with this code, you need to put it in the custom.js file because that's the only place where Primo VE can use it. You stick it at the end of the file, separate from any other code on the page.

Libraryh3lp:

Here's an example of basic Libraryh3lp chat code that could be added to the end of the custom.js file, separate from any other code:

// libraryhelp code
(function() {
    var x = document.createElement("script"); x.type = "text/javascript"; x.async = true;
    x.src = (document.location.protocol === "https:" ? "https://" : "https://") + "us.libraryh3lp.com/js/libraryh3lp.js?1871"
    var y = document.getElementsByTagName("script")[0]; y.parentNode.insertBefore(x, y);
  })();

LibraryH3lp has their own FAQ on adding a chat widget for Primo and they are willing to help you create pop-out chat windows and do other things with your code. 

Springshare:

Here's information about adding the Springshare chat widget: https://developers.exlibrisgroup.com/blog/embedding-springshare-libchat-widget-into-the-primo-nu/ Rebecca Nous noted: "We applied the principles in that article to include our own JavaScript file that combines LibChat and LibAnswers content via the Springshare API, and it works."

Known Issues:

There are currently some issues with the js in chat. In GCC's case, the chat functionality goes from being available to unavailable when clicking the "new search" button.  It seems as if the js is getting lost. 

Joe Riggie reported: "Sometimes, each refresh causes the widget to toggle between displayed and hidden...click and it shows, click again and it disappears. I can't quite replicate it...sometimes it stays hidden through multiple clicks." Lynn tried the following: "I've made two changes to your view:

  • added a new default search link including the search scope that will refresh the page
  • changed the default behavior to open in a new window (I initially tried the current window by the JS was still being dropped)

This seems to keep the widget displayed."

 

Topics

  • Last Updated Dec 24, 2019
  • Views 1532
  • Answered By Michelle Eichelberger

FAQ Actions

Was this helpful? 2   0

Comments (2)

  1. Thank you for making your FAQs public. Very helpful!
    by m schwendener on Nov 26, 2019.
  2. "LibraryH3lp ... are willing to help you" Indeed. Their support is fantastic. And they have understood the special structure of Primo VE with js, css and html in separate files.
    by m schwendener on Jun 18, 2020.