FAQ content

Widgets: Embed your LibAnswers and LibChat content in an LMS, discovery service, or other systems

In this article

One way you can expand the reach of your chat reference service is by embedding LibChat widgets in your Learning Management System (LMS), discovery service, or other third-party system. There are a few ways in which you can do this. Please work with your institution's local admin(s) to see which option will work best for you.


Using the LibApps LTI tool

LTI stands for Learning Tools Interoperability - it's a standard for integrating tools from third-party services into Learning Management Systems (LMS) like Blackboard, Canvas, Brightspace / Desire2Learn, Moodle, Sakai, etc. In terms of Springshare's products, it's a way to seamlessly integrate Springshare content into your LMS.

Not only does this include easily displaying relevant LibGuides in your LMS courses, but it also allows you to include your LibAnswers content, as well -- all without having to embed any code directly into your LMS.

This can be done through the LibApps LTI Automagic tool, which (auto)magically brings together relevant content for each course on a single landing page! This allows you to share a ton of library information, including:

  • Links to related guides / e-reserves courses,
  • a link to your A-Z Database page (optionally customized to a subject),
  • LibAnswers widgets: LibChat & Search,
  • LibCal widgets (if you subscribe to LibCal): Room Bookings / Spaces, Appointment Scheduling, Today's Hours.

The LibApps LTI Tool is available as part of LibGuides CMS. Not yet a CMS subscriber? Contact our Springy Sales Team for more details. Not only will you get the LTI tool, but you'll also unlock additional LibGuides functionality that will level-up your LibGuiding!

Already a CMS subscriber? Great, you're ready to get started! Check out our article How to set up and use the LibApps LTI tools in your learning / course management system. The Using the LTI Automagic tool section will help you configure the LTI within the most popular LMSes.

You'll want to work closely with your LibApps Admin (if that's not you), as well as your LMS Admin(s) to get this set up.


Using the embed code for LibChat and LibAnswers widgets

If your LMS supports embedding JavaScript code and you have permission to do so, then you should be able to copy and paste the embed code already provided by LibChat. Each widget will have a <script> element and a <div> element, with the <script> generating the chat widget inside of the accompanying <div>. (Not allowed to embed JavaScript code into your LMS? Check out the Using a non-JavaScript embed section option below.)

Although you will likely get the best results using an In-Page (Embed) type of chat widget, you could explore the button pop-out, slide-out tab, and floating type widgets, too. FAQ, Search, and Question Form widgets also have in-page and pop-out options, as well.

Again, please consult with your LMS admin to see which type of widget would work best within your system. If your LMS does not allow code to be embedded, we encourage you to check out the LibApps LTI Automagic tool. Not only is it easier to integrate into multiple courses, but you'll also benefit from displaying your widgets alongside relevant content from LibGuides and LibCal, too!

For more info about create and embedding widgets, check out the following help articles:


Using a non-JavaScript embed for LibChat

If your LMS does not allow you to embed HTML code that includes <script> elements, or you do not have permission to do so, there is another option for adding a LibChat widget to your LMS. This method will still work to allow students to chat, but please note that the student will not be able to see the online/offline status (i.e. if it’s online or offline directly from the course page). However, if you are using our 24/7 LibChat Co-Op, this will not be a big issue. :)

Once you have a chat widget ready, follow the steps below:

  1. Log into LibAnswers and go to LibChat > Chat Widgets.
  2. Locate the chat widget you want to use and click on its View Widget Code () icon in the Actions column.

Example of a view a widget's embed code

  1. Click on the Direct Link tab on the Widget Code modal.
  2. Copy and paste the direct link into a text editor (such as Notepad on Windows or TextEdit on macOS).

Example of a view a widget's direct link

  1. In your text editor, wrap the direct link for the widget within an <iframe> tag, using the URL for the widget as the src URL. For example:
<iframe src="https://yourlibrary.libanswers.com/chat/widget/a53a2c26ce9340e323fffe4531dd0341"></iframe>
  1. Copy and paste the following inside the opening <iframe> tag to give it an initial height and width:
style="width: 100%; height: 340px;"

You should end up with something that looks like this:

<iframe src="https://yourlibrary.libanswers.com/chat/widget/a53a2c26ce9340e323fffe4531dd0341" 
style="width: 100%; height: 340px;"></iframe>

Now you have the code you need to display your widget. Again, please consult with your LMS admin to see which option would work best within your system. If your LMS does not allow code to be embedded, we encourage you to check out the LibApps LTI Automagic tool. Not only is it easier to integrate into multiple courses, but you'll also benefit from displaying your LibChat widget alongside relevant content from LibGuides and LibCal, too!


Linking to a chat widget

If you only want to have a direct link to a chat widget, you can proceed with the same steps as above to get the direct link for the widget -- making it possible to view a chat widget in its own browser window/tab.

Once you have a chat widget ready, follow the steps below:

  1. Log into LibAnswers and go to LibChat > Chat Widgets.
  2. Locate the chat widget you want to use and click on its View Widget Code () icon in the Actions column.

Example of a view a widget's embed code

  1. Click on the Direct Link tab on the Widget Code modal.
  2. Copy and paste the direct link for the chat widget.

Example of a view a widget's direct link

Now you have the URL you need to link to the widget!

Pass additional parameters in the chat widget link

You can also append additional query string parameters to the direct link for a chat widget to pass known data about the patron into the resulting chat exchange. These are generally used by sites who are custom coding their own scripts to help pass these details into the chat exchange from a third party communication tool (like a chatbot).

Available parameters:

  • question: fills in the initial question field.
  • patron_name: fills in the patron name field.
  • patron_email: fills in the patron email field.
  • referer: include the referring URL.
  • referer_title: include the referring URL title.
Examples

If you would like to pass the name and email address of the patron in the query string for the chat widget link, you can include the parameters for patron_name and/or patron_email.  We recommend using a chat widget that has the Login Form enabled and also prompts for contact info so that the name and contact info (email) fields are available when the widget is loaded.

  • To include the patron's name, add the patron_name parameter to the URL, and pass the name in a URL-encoded format. This URL would look like:
https://yourlibrary.libanswers.com/widget_chat.php?hash=foobar0ed21a265dec0c451a9e336166&patron_name=Joe%20Springy
  • To include the patron's email address, add the patron_email parameter to the URL, and ensure that the email address is valid. (The widget will not accept partial/invalid email addresses.) This URL would look like:
https://yourlibrary.libanswers.com/widget_chat.php?hash=
foobar0ed21a265dec0c451a9e336166&patron_email=stu.dent@springy.edu
  • To include both the patron name and patron email address, the URL would look like:
https://yourlibrary.libanswers.com/widget_chat.php?hash=
foobar0ed21a265dec0c451a9e336166&patron_name=Joe%20Springy&patron_email=stu.dent@springy.edu