sendDownload
The sendDownload() method records a download initiated by the app. You can use it to track files (for example, attachments, documents, media) that the app fetches on behalf of the user.
Syntax
PiwikTracker.sharedInstance()?.sendDownload(url: "url")[[PiwikTracker sharedInstance] sendDownload:@"url"];Parameters
- url
string, required- The download URL. Example:https://example.com/paid-app.zip.
Examples
To track a download of https://example.com/paid-app.zip initiated by the app:
PiwikTracker.sharedInstance()?.sendDownload(url: "https://example.com/paid-app.zip")[[PiwikTracker sharedInstance] sendDownload:@"https://example.com/paid-app.zip"];Notes
- Downloads appear in the download report under Analytics > Reports > Downloads.
- Every URL you pass is sent as a download event; the SDK does not check the file extension.