sendDownload

The sendDownload() method records clicks on links to downloadable files. You can use it to track app downloads.

Syntax

[[PiwikTracker sharedInstance] sendDownload:@"downloadURL"];

Parameters

downloadURL (string, required)

The download URL. Example: https://example.com/paid-app.zip.

Examples

To track a click on https://example.com/paid-app.zip as a download:

[[PiwikTracker sharedInstance] sendDownload:@"https://example.com/paid-app.zip"];

Notes

  • Downloads are visible in the download report in Analytics > Reports > Downloads.
  • Here's the default list of file extensions tracked as downloads: 7z, aac, apk, arc, arj, asf, asx, avi, azw3, bin, csv, deb, dmg, doc, docx, epub, exe, flv, gif, gz, gzip, hqx, ibooks, jar, jpg, jpeg, js, mobi, mp2, mp3, mp4, mpg, mpeg, mov, movie, msi, msp, odb, odf, odg, ods, odt, ogg, ogv, pdf, phps, png, ppt, pptx, qt, qtm, ra, ram, rar, rpm, sea, sit, tar, tbz, tbz2, bz, bz2, tgz, torrent, txt, wav, wma, wmv, wpd, xls, xlsx, xml, z, zip.
  • Downloads don't get prefixes in the URLs. Instead, they are marked as download events.