Page History
Table of Contents | ||
---|---|---|
|
CardioLog SaaS Client-Side API
The CardioLog SaaS Tracking Agent offers a client-side API to send events, and track button clicks, banner clicks, navigation links or interactions with other UI components that display content dynamically (without redirecting to the actual content page URL).
...
You can call the sendEvent JavaScript function on any monitored page to send events to CardioLog SaaS via the client browser.
Info | ||
---|---|---|
| ||
/**
* @method sendEvent
* @param {String} eventName
* @param {String} URL
* @param {Function} [optional] function to be executed after the event is sent
*/
CardioLogAgent.API.sendEvent(eventName, URL, eventCallback); |
The sendEvent function accepts the following parameters:
- eventName - Required. The event type name (e.g, 'Pageview').
- URL - Required. The content page URL.
- eventCallback - Optional. Function to be executed after the event is sent.
Code Sample
Send a click event on a DOWNLOAD button:
Info | ||
---|---|---|
| ||
<input type="button" value="DOWNLOAD" onclick="openDownloadForm();CardioLogAgent.API.sendEvent('Pageview', 'http://www.intlock.com/pages/download.aspx', function () { console.log('event sent'); } ); /> |
...
With the CardioLog SaaS API you can:
- Track visitor actions within the browser such as button and banner clicks, form field data entries and more by implementing some simple JavaScript using the client-side API.
- Send custom events to CardioLog from any application using the server-side API.
- Track visitor actions from non-browser applications, including mobile apps, using the server-side API.