JavaScript API
Overview
The JavaScript API screen is intended as a reference library for clients who need to integrate their own websites with Cheetah Digital. 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.
-
Getting Started: This sample code covers basic initialization, and is suitable for most use cases, such as implementing a Web Event, for example.
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 _trackPageviewcall in your webpage code if the intention is to record each page hit only once.
-
Web Track: This sample code is intended for clients who are using Web Events to track consumer actions. On this screen, you can select a Web Event. The sample code is then refreshed accordingly.
Access
The JavaScript API screen is accessible by the following method:
-
From the Main menu, select Data > Integration > JavaScript API