Advanced widgets integrations

Advanced widgets integrations

Quick navigation - Using elements on the website to call a widget (#elements) - Starting a chat/opening a pre-chat form automatically when the website is loaded (#auto_start) - Display contact widgets ONLY on specific pages (#display) - Do NOT display contact widgets on specific pages (#not_display) - Display chat button only to customers from a specific country (#country) Do not forget to change the URL of your LiveAgent and the button ID in the below code examples. Using e...

Automatically enable/disable chat button during business hours

Normally LiveAgent chat buttons are displayed on a website when there is at least 1 agent available on chat in the department for which the button is created. When there is no one available the button is either hidden or a contact us button which opens a contact form is displayed. This default behavior is usually enough but for larger traffic websites it might be a good idea to hide the button outside of business hours even when agents are still online on chats. For example you did not allow th...

Change button on demand without page reload

Sometimes you need "refresh" chat button without page reloading, for example in case of using angularJS or dynamic language switching. Use button integration code without `LiveAgent.createButton`, so your code will look like: <script type="text/javascript"> (function(d, src, c) { var t=d.scripts[d.scripts.length - 1],s=d.createElement('script');s.id='la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded'...

Add note to chat or contact form

Sometimes you may need to pass some additional information to the chat or contact form that will be displayed to an agent (https://www.liveagent.com/features/agents/). For example, it can be cart id of customer shopping cart. If an agent can see this cart id he can check what is in customer's cart. Adding note to chat / contact form 1. locate integration code of your chat or contact us button. it should look like this: <script type="text/javascript"> (function(d, src, c) { var t=d....

Prefill email and name for customer

When your chat button (https://www.liveagent.com/features/real-time-chat/) or contact form is integrated within your CMS you usually already know the e-mail address and name of your customer so you do not need to ask for it in a contact form. You can prefill both the e-mail address, name or phone of the customer or any custom value by adding some special code to your widget code. Since version 5.17 prefill methods logic has been changed and new method has been added. More info here: https://...

Integrate button into Angular application

Angular applications are typically written in TypeScript. Below is a simple example of Angular 8 component that creates a button. Note that in your TypeScript component you need to declare a variable with exact name 'LiveAgent' (mind the capital L) to be able to use a global variable defined in track.js with the same name. contact.component.html ... <div id="chatButton"></div> ... contact.component.ts import { Component, OnInit } from '@angular/core'; declare var LiveAgent: any;...

LiveAgent Web Contact Cards

Introduction LiveAgent Web Contact Cards provide a convenient way to access and interact with contact information on the web. By hovering over embedded email addresses and phone numbers, you can view CRM data and related tickets associated with the contact. In this article, we'll explore the three integration methods for using LiveAgent Web Contact Cards and their benefits. Integration Methods for LiveAgent Web Contact Cards Choose one of the following three methods to start using Live...

Add chat button to Google Tag Manager

Google Tag Manager allows you to quickly and easily update: - Tags and code snippets on your website, such as those intended for traffic analysis and marketing optimization. - Configuration and flag values of mobile apps that you have created. What is a tag? A tag is a snippet of JavaScript that sends information to a third party, such as Google. If you don't use a tag management solution such as Google Tag Manager, you need to add these snippets of code directly to files on your ...
×