JavaScript API

Overview

The JavaScript API screen is intended as a reference library for clients who need to integrate their own websites with Messaging. This screen provides sample JavaScript code that can be copied-and-pasted from the platform into your own site.

Sample Options

The JavaScript API screen provides sample code for the following features. These features are accessible from the Function Menu.

This sample code consists of two scripts. If your webpage already uses Google Analytics tracking, then you should omit the first <script> section; otherwise it should be included. Copy and paste the <script> section(s) just before the </body> tag of your webpage. Please note that this script includes the line:

_gaq.push(['_trackPageview']);

If your webpage already calls _trackPageview, then Google Analytics will count each visit twice. You should keep only the last _trackPageview call in your webpage code if the intention is to record each page hit only once.

Access

The JavaScript API screen is accessible by the following method: