Manually Logging (click) Events With Javascript

To manually log click events with the Logaholic Javascript Tracker, you will need to add the following code snippet to your selected onclick event-handler (Replace “insertpage” with the URL of the page that needs to be logged when the click event is triggered.)

[html]
lwaLogPage(<"insertpage") [/html]

If your pages don’t include click events, create them for each clickable element you’d like to track. If you need to do this, you can add the following code snippet to your HTML element. (Again, replace ”insertpage” with the URL that needs to be logged.)

[html]
onclick=”lwaLogPage(\”insertpage\”)”
[/html]

Example 1: Tracking download files

If you have implemented tracking on a page that contains a link to a PDF document, your Logaholic reports will not include statistics showing when visitors click on the link that downloads the PDF file. To include these clicks in your statistics, you will need to add the following tag to your web page:

Below are two code snippets: The first shows a link without the tag. The second shows a link that contains the tag.

Without tag:

[html]
A link to a PDF document.
[/html]

Contains tag:

[html]
A link to a PDF document.
[/html]

Example 2: Tracking ‘Exit Clicks’ from your site to another

If you have implemented tracking on a page that contains a link to an external website, your Logaholic reports will not include statistics showing when visitors click on the link to the external site. To include these clicks in your statistics, you will need to add the following tag to your web page:

Without tag:

[html]
A link to an external webpage.
[/html]

Contains tag:

[html]
A link to an external webpage.
[/html]