Integrating LiveHelpNow into Google Tag Manager
How do I install LiveHelpNow widget code in Google Tag Manager
Google Tag Manager (GTM) is a simple solution for managing JavaScript snippets that send data to third parties (like LiveHelpNow) from your website or app. You can easily add or remove snippets without requiring a developer to update any code.
GTM is highly recommended for LiveHelpNow widget installation. It is easy, fast and the simplest way to load the LiveHelpNow on your website.
Important:
-
You must have Google Tag Manager installed on your website.
-
You'll need permissions to edit your website's Google Tag Manager configuration. — If you're unsure who owns your Google Tag Manager account, check with the team or person who manages your website, SEO or Marketing operations.
- Please first copy LiveHelpNow widget code from Admin Panel > System setup > Website code
- Sign in to google tag manager and select your website's container
- From the 'Tags' section of your GTM account, click 'New' to create a new tag:
- Name the new tag "LiveHelpNow" and select Custom HTML for tag Type
-
Paste coped in step 1 LiveHelpNow code into the HTML portion and open the 'Triggering' section, and choose the trigger for loading the LiveHelpNow widget.
You can choose an existing trigger, or create a new one with the '+' icon in the top right:
Tip: For optimal user experience we recommend choosing “Window Loaded”, so your website loads as fast as possible:
-
Your tag is now configured!
All that is left to do is to “Submit” the changes to your container for them to take effect.
Additional customization for ambitious users out there.
Note: These examples may require creating custom tags in Google Tag Manager, if you’re not already tracking the events needed to trigger the method.
Show message or start chat when a visitor shows signs of leaving your website
Create "Exit intent" tag by using the following JavaScript in custom html tag type:
<script>
(function(){
varstb_exitintent=false;
document.addEventListener("mousemove",function(e){
varscroll=window.pageYOffset||document.documentElement.scrollTop;
if((e.pageY-scroll)<10&&stb_exitintent==false){
dataLayer.push({"event":"exit_intent"});
stb_exitintent=true;
}
});
})();
</script>
Like so:
Setup a new trigger for exit intent:
Then add a new tag to launch chat window or send invitation messages, etc. by following LiveHelpNow JS Sdk docs
Getting support with Google Tag Manager
If you have trouble identifying or tracking logged in users, tracking custom events, or triggering Intercom methods with custom tags that rely on GTM's data layers we recommend getting support from Google directly.