Function ze\file::trackDownload()

In PHP:
ze\file::trackDownload(
$url
)

Description

This function is used to generate a string of JavaScript code which can be placed in the onclick events on links to file downloads. This download is then recorded if the site is registered on Google Analytics.

Parameters

$url

The URL to appear in Google Analytics for this download. Should be in the format "public/file.png" or "private/file.png".

Return Value

A string of JavaScript code.