Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
clientside api
clientside api
CardioLog Client-Side API

The CardioLog tracking agent Tracking Agent allows for a client-side API to send custom events, and easily monitor button and banner clicks , video plays, or interactions with other UI components. On any monitored page, you can call the following JavaScript functions:

Anchor
sendevent js
sendevent js
The SendEvent JavaScript Function

...

The SendEvent function allows you to send events via the client

...

browser. Using this function you can monitor clicks on UI elements such as buttons, banners, navigation menu entries, links, etc. 
The Tracking Agent uses AJAX (Asynchronous JavaScript And XML) to send the event to the CardioLog server, and will not affect the user interaction with the page in any way.

Code sample for sending a page view event:

...

Info
iconfalse

document.__Page.SendEvent('

...

Event Type', 'Event Title', 'Param 1', 'Param 2');

The SendEvent function accepts the following parameters:

  • Event Type - Required. The event type title (eg., "Visit," "Search," 'Visit' or custom event types).
  • URLEvent Title - Required. This is typically the URL of the visited page, but can be any text that represents an the event or action. We recommend defining a unique prefix for each logical group of objects for streamlined reports. This string is limited to 1000 characters.
  • Param 1 - Optional. Used to store additional information about the event, typically for custom event types. This string is limited to 1000 characters. Built-in events reserve this string for the system. For example, in a "Visit" event it stores the referrer information; in a "Search" event it stores the search term.
  • Param 2 - Optional. Used to store additional information about the event, typically for custom event types. This string is limited to 50 characters. Built-in events reserve this string for the system. For example, in a "Search" event it is used to store the number of results.

...

Notes: 

 

  • When calling the "SendEvent" function within a different frame from where it is defined, make sure to reference the frame object containing it. For example, by

...

  • using parent.document.__Page.SendEvent()

...

  • .
  • In order to capture a click on a banner that links to an external site, make a call to the CardioLog SendEvent function before redirecting the user to the external destination page.

...

  •  

 

Code Samples
  1. Send a click event on a DOWNLOAD button:

    Image Added
    www.intlock.com main page DOWNLOAD button

    Info
    iconfalse

    <input type="button" value="DOWNLOAD" onclick="document.__Page.SendEvent('Visit', '

...

  1. Main Page Buttons > DOWNLOAD');"

...

  1. />

     
    In this example, when a user clicks on the

...

  1. DOWNLOAD button CardioLog will send an event of type

...

  1. 'Visit

...

  1. ' to the server, specifying which

...

  1. button has been clicked by the

...

  1. user (ie.,

...

  1.  'Main Page Buttons > DOWNLOAD'). We recommend defining a unique prefix for each group of UI components that will be displayed in reports (in this case,

...

  1. 'Main Page Buttons').

    To see how many times

...

  1. the button was clicked, use the Events report (chart or table), and

...

  1. type 'Main Page Buttons' in the Website Item field.

...

  1. To see who clicked

...

  1. on the button, use the Visitors by Events report (chart or table), and

...

  1. type 'Main Page Buttons' in the Website Item

...

  1. field.

Please note that CardioLog automatically tracks outbound links from SharePoint sites to external destinations. To see how many times your links were clicked, use the Extended Tracking API report.

...

When users navigate internal links, you can monitor both the referring navigation component such as banners or menu items, along with the referring page. The SetReferrer function allows you to set custom page referrer details that are sent to the CardioLog server via following events (using SendEvent).

Code Sample:

...


  1. Send a click event on a banner that links to an external site:


    Image Added
    support.intlock.com main page Intlock logo

    Info
    iconfalse

    <a href="http://www.intlock.comonclick="document.__Page.

...

  1. SendEvent('

...

  1. Visit', 'Banners > Intlock Website');"><img src="

...

  1. intlock_logo.gif"></a>

 The SetReferrer function accepts the following parameters:

    • Id - Required. The custom page referrer details. This can be any string representation. We recommend defining a unique prefix for each logical group of objects for optimized reports.
    • Param 1 - Optional. Used to store additional information about the event, typically for custom reports.

...


...

In order to capture the referring UI component before redirecting the user, make a call to the CardioLog SetReferrer function. Assuming the banner was implemented with simple HTML, this is a code example:

<a href="http://mysite/rnd/index.aspxonclick="document.__Page.SetReferrer('Banners > MySite > Research and Development');"><img src="rnd.gif"></a>

How many visitors accessed my page through a UI referrer? To see how many visitors arrived on your page through your UI referrer, use the Extended Tracking API report, and select the page in the Website Item URL field.

  1. In this example, when a user clicks on the banner CardioLog will send an event of type "Visit" to the server, specifying which banner has been clicked by the user before redirecting to "www.intlock.com" (ie., "Banners > Intlock website"). We recommend defining a unique prefix for each group of UI components that will be displayed in reports (in this case, "Banners").

    To see how many times the banner was clicked, use the Events report (chart or table), and type 'Banners' in the Website Item field.
    To see who clicked on the banner, use the Visitors by Events report (chart or table), and type 'Banners' in the Website Item field.

    Note: CardioLog automatically tracks outbound links from SharePoint sites to external destinations. To see how many times your links were clicked, use the External Destinations report.

Anchor
sendgoal js
sendgoal js
The SendGoal JavaScript Function

The SendGoal function allows

...

you to send JavaScript based goals via the client

...

browser. The Tracking Agent uses AJAX (Asynchronous JavaScript and XML) to send the goal event to the server, and does not affect the user's experience with the page in any way.

Code Sample:

...

Info
iconfalse

document.__Page.SendGoal(

...

Goal ID);

...

 The SendGoal function accepts the following parameter:

...

  • ID column.

    Image Added 
    Settings - Goals 
     

 

Code Sample

 

  1. Send a goal event on a Register to a Webinar button:

    Image Added
    www.intlock.com main page REGISTER NOW button

    Create the goal, and make a call to the CardioLog SendGoal function

...

Assuming the signup button was implemented using simple HTML, the following code sample should work:

  1. with the proper Goal ID.

    Info
    iconfalse

    <input type="button" value="

...

  1. REGISTER NOW " onclick="document.__Page.SendGoal(1);" />

...


  1. To monitor your goal progress, use the Goal reports, and select the relevant goal in the Visitor Segments > Goal

...

  1. filter of the widget preferences.

    Image Added 
    Visitor Segments > Goal 

Anchor
internal email
internal email
Monitoring Internal E-Mail Campaigns

...

using the __referrer Parameter

The CardioLog Client-Side API supports identifying and monitoring external locations. You can use the _referrer parameter whenever you publish a link to your monitored environment and you wish to track the source of the referring page. This is most commonly used in email or social media. For example, if you have included an internal link in a promotional email add the __referrer parameter to track the number of users who visited your site via this link. Define a unique referrer name that will be displayed in reports, such as __referrer=email_promotion_Dec_2016 in order to display the link accordingly:

http://myportal/sites/rnd/default.aspx?__Referrer=email_promotion_Dec_2016

How many visitors arrived on my page through my email campaign? To see how many visitors arrived on your page through your email campaign, use the Extended Tracking API report, and select the relevant page in the Website Item URL field.

Anchor
serverside api
serverside api
CardioLog Server-Side API

...

For MOSS 2007 only:
[CardioLog installation directory]\CardioLogAgent\MOSS2007_1.2.js

For SharePoint 2010 only:
[CardioLog installation directory]\CardioLogAgent\SP2010_1.2.js

For SharePoint 2013 only:
[CardioLog installation directory]\CardioLogAgent\SP2013_1.2.jsFor SharePoint 2016 only:
[CardioLog installation directory]\CardioLogAgent\SP2016_1.2.js



Note: If you have implemented the Tracking Agent using the CardioLog Analytics SharePoint Feature on your WFE (Web Front End), edit the __eEvents array and add the custom event type accordingly:

For MOSS 2007 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\CardioLogAgent\MOSS2007_1.2.js

For SharePoint 2010 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\CardioLogAgent\SP2010_1.2.js

For SharePoint 2013 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\CardioLogAgent\SP2013_1.2.js

For SharePoint 2016 only:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\CardioLogAgent\SP2016_1.2.js

...

 


...