• Hosted in the EU
  • GDPR Compliant

Installing Channel.me

Installing Channel.me

Introduction

In order to install Channel.me for either Chat or Cobrowsing you have to install a single script on all of your web pages. This script connects your webpage to Channel.me and makes it possible to maintain chat and cobrowse sessions on all the pages you want.

Prerequisites

  • Basic html knowledge.
  • Access to the sources of you site, or tag-manager.
  • Your Channel.me account id.

NOTE: You can find your account id here: https://channel.me/account/settings/code

Installation

First it is needed to install a javascript script on your pages. You can either place this script in the head section or somewhere in the body. The exact location does not matter. Your page will display quicker when you place the script somewhere at the bottom of your page.

<script data-code="a1b2c3d4" type="application/javascript" src="//channel.me/siteconnect.js"></script>

Options

There are a couple of options. The connect script makes it possible to assign a separate connection number for every different customer on you website. This number makes it possible to guide this customer over you website. When the customer provides you this number, you can connect to them with a co-browsing session. Any element can contain the number. In order to do this you can place it in a <p> or <div> element. This element should have the id channelwww.

Example:

<p id="channelwww">0000</p>

When the siteconnect script intialises, it will look for an element with this id on the current page. When it finds the element it updates the text element inside.

NOTE: It is important this element is on the page, before the siteconnect script is loaded. 

Complete Example:

<style>
// add custom styling
</style>

<p id="wwwchannelme">0000</p>
<script data-code="a1b2c3d4" type="application/javascript" src="//channel.me/siteconnect.js"></script>

Advanced

In order to speed up loading the page it is possible to place the siteconnect script dynamically with a tag manager. It is also possible to use the defer or async attributes of the <script> tag. When you use these options it is important to ensure the channelwww element is available on the page when the script is executed. This can be done best by making sure the element is already in the source html. When a tag manager is used, the a similar precataution. 

 

Supporting Cobrowsing on Embedded Cross Domain iFrame

NOTE: The information in this chapter is only applicable when your pages on your site contains cross-domain iFrames, and you want to support co-browsing on those page.

The siteconnect script needs to be able to access the contents of embedded cross domain iframes. When you site contains those you have to place a helper script on those page. With this helper script, the siteconnect script can support co-browsing on cross domain frames. In order to do this you have to place 

<script type="application/javascript" src="//channel.me/frameconnect.js"></script>

Somewhere on the iframe's source. It is advised to place this script somewhere at the bottom of the body to speed up loading.