Note: The standard tracking configuration automatically tracks your downloads. If this is not the case in you situation you might may want to activate it youself via the following command: 'setDownloadFileTypes', ['partialtext', 'partialtext', ..., 'partialtext']. A 'partialtext' could be '.pdf' or 'http://www.downloads.com/' of any other text that works in you case. The text are matched with href of all the links found on you page. You can also check out the tracking log, to se if a 'setDownloadFileTypes' command is called.
The 'postDownload' command has the following interface:
'postDownload', breadcrumb [, linkUrl][, hostingUrl][, optionalVariables]
Examples of use:
$netminers.push( ['postDownload', 'http://www.toysinc.com/brochure_fall_2050.pdf'] );
Activate download tracking when a link to a downloadable ressource is clicked by a user:
You have the following link
<a href="http://www.toysinc.com/brochure_fall_2050.pdf">Download Brochure Fall 2050</a>
You add an onclick handler with the following javascript that instructs the tracking script to send information about the download.
<a onclick="$netminers.push(['postDownload', this.href])" href="http://www.toysinc.com/brochure_fall_2050.pdf">Download Brochure Fall 2050</a>
Note: when a user downloads a pdf document while a pdf document reader is enabled in the browser the pdf document opens in the same window as where the link is. This means that the current page is unloaded and so is the tracking script. Depending on how fast the unload of the pages occurs there is a big risk that the event never is registered on the Netminers tracking servers. To maximize tracking reliability we suggest you add a target="_blank" to the download link. Now the link anchor looks like this
<a target="_blank" onclick="$netminers.push(['postDownload', this.href])" href="http://www.toysinc.com/brochure_fall_2050.pdf">Download Brochure Fall 2050</a>