sendDownload
The sendDownload() method records downloads initiated by the app. You can use it to track files, such as, 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 initiated by the app for https://example.com/paid-app.zip:
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. She SDK doesn't check the file extension.
Related methods
Updated 2 months ago
Did this page help you?