|
JavaScript, Pop-up menus and DHTML |
|
JavaScript links
After ClickTracks has rendered the HTML for the page it parses the HTML looking for <a href=> and other labels, examining each one and matching that against clicks seen, finally displaying a % bar near them. This process does not work in situations where the <a href> element uses an onclick event handler and then JavaScript to navigate to a new URL. Although ClickTracks knows that a hyperlink is hidden inside JavaScript, it cannot know where that link leads until after the JavaScript is executed, and therefore cannot place a % bar next to it. The only way to know which page the JavaScript will lead to is to execute the script by clicking the link.
ClickTracks contains a special mechanism that can work out the target of each JavaScript link when clicked. From the keyboard press and release F2 then click the JavaScript link. ClickTracks executes the JavaScript but traps the target before the navigation to that page takes place. It can then match this target URL against the data seen in the clickstream.
This process must be repeated for each link on the page. ClickTracks can't parse the page and reliably extract every JavaScript link and execute the underlying script automatically.
The manual nature of this process is not ideal, so you should consider using the Path View in addition to the browser view. The path view contains simply the next page in sequence viewed by the visitors, and does not need to match this against a hyperlink on the screen. Therefore the clicks hidden behind JavaScript are always visible in the path view.
DHTML
Dynamic HTML means HTML that changes dynamically within the browser. Confusingly the term Dynamic Websites or Dynamic Scripting means something totally different (the ability for code running on the server to generate different pages). DHTML is most commonly used for dropdown menus as part of the navigation structure on a page. As the visitors moves the mouse around different menus become visible.
ClickTracks does not display percentage bars for links that are not currently visible. If you cause a DHTML area to become visible you need to tell ClickTracks to parse the page again and display the newly visible links. Pressing F3 will do this.
The Path View helps to simplify this problem since it shows all onward clicks from this page, without regard for whether the corresponding links are currently visible in the browser view.
Don't forget the Path View
The Path View shows the next page in sequence, even if that page cannot be found within the HTML. In many cases simply looking at the Path View is the easiest way to get to the data.