Versions Compared

Key

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

...

  • Track visitor interactions with the browser such as clicks on a button or a banner, filling out form fields, playing videos and more, using our JavaScript API.
  • Monitor internal E-mail campaigns.
  • Send events to CardioLog from any application using the CardioLog Events API web service.
  • Create custom events and build custom reports using the CardioLog SDK
  • Build applications to request data from the CardioLog reporting engine using the Data Export API, refine the results, display them anywhere you would like and brand your data with your organization's colors and logos.
  • Track visitor actions for non-browser apps, such as mobile apps.

...

Anchor
sendevent js
sendevent js
The SendEvent JavaScript Function

This function allows you to send events via the client agent. The Agent uses AJAX (Asynchronous JavaScript And XML) to send the event to the server, and will not affect the user interaction with the page in any way.

Code sample for sending a page view event:


The SendEvent function accepts the following parameters:

    • Event Type - Required. The event type title (eg., "Visit," "Search," or custom event types).
    • URL - Required. This is typically the URL of the visited page, but can be any text that represents an 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.

Note: 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()

Monitoring Banner Clicks

You can monitor clicks on UI elements such as banners, buttons, navigation menu entries, links, etc.

...

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

...

. IF the banner was implemented with simple HTML, you can insert this code:

<a href="http://www.google.comonclick="document.__Page.SendEvent('Visit', 'Banners > My Links >

...

externalsite.com');"><img src="google_logo.gif"></a>

In our 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 "externalsite" (ie., "Banners > My Links>

...

externalsite.com").

...

We recommend defining a unique prefix for each

...

group of UI components that will be displayed in reports (in this case

...

, "Banners")

...

 .

How many times were my banners

...

clicked?

...

 To see how many times your banners were clicked, use the Page Views > Events (Page Views by URL) report (either chart or table), and

...

select "Banners" in the Website Item field.

Who clicked on my banners?

...

To see who clicked on your banners, use the Unique Users > Vistors by Events (Unique Users by URL) report (either chart or table), and

...

select "Banners" in the Website Item URL 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 

...

External

...

Destinations report.

The SetReferrer JavaScript Function

When dealing with internal links, besides monitoring the referring pages, you can monitor the referring navigation component (such as banners).

The SetReferrer function allows setting custom page referrer details, to be sent to the CardioLog server in future events (by SendEvent).

Code Sample:

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

 The SetReferrer function accepts the following parameters:

    • Id - Required. The custom page referrer details. This can be any string representation (make sure to define a unique prefix for each logical group of objects for optimal reports).
    • Param 1 - Optional. Used to store additional information about the event (for custom reports).

Monitoring UI Referrers

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:

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

How many visitors arrived on my page through my UI referrer?

To see how many visitors arrived on your page through your UI referrer, use the Navigation > Internal Traffic Sources report (either chart or table), and select the page in the Website Item URL field.

 

The SendGoal JavaScript Function

This function allows for sending JavaScript based goals via the client agent. The Agent uses Ajax (Asynchronous JavaScript and XML) to send the goal event to the server and will not affect the user interaction with the page in any way.

Code Sample:

 The SendGoal function accepts the following parameter:

Note: Goals are created in CardioLog > Administration > Goals. See "how to create a goal". After creating the goal, the Goal ID can be found in the tab_goals table (column - id) in the CardioLog database.  

Monitoring JavaScript-Based Goals

In order to capture a JavaScript based goal, such as signing up to a newsletter, define the goal in CardioLog > Administration (See "how to create a goal"), and make a call to the CardioLog SendGoal function.

Assuming the signup button was implemented with simple HTML:

<input type="button" value="Signup to Newsletter" onclick="document.__Page.SendGoal(1);" />

Goal Reports 

To see reports about your goals, use the Goals reports, and select the goal in the Visitor Segments > Goal field.

 

Monitoring Internal E-Mail Campaigns using the __referrer Parameter

The CardioLog Client-Side API supports capturing external referrers. 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 (e.g. email).

For example, if you have included an internal link in a promotional email add the __referrer parameter to be able to track the number of visits this link produced:

Define a unique referrer name that will be displayed in reports, such as __referrer=email_promotion_12_Dec_2008

 

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 Navigation > Internal Traffic Sources report (either chart or table), and select the page in the Website Item URL field.

CardioLog Server-Side API

...