sendApplicationDownload
DeprecatedThis method is no longer recommended. Use the applicationInstall() method instead.
The sendApplicationDownload() method records the launch of a new app version. The event is sent the first time the app is launched after it is installed or updated, and is queued only once per combination of app version and build number (per site ID). If a user installs or updates your app but doesn't run it, the event is not sent.
Syntax
PiwikTracker.sharedInstance()?.sendApplicationDownload()[[PiwikTracker sharedInstance] sendApplicationDownload];Example
To track the installation of your app:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Configure the tracker in your application delegate
PiwikTracker.sharedInstance(siteID: "site-id", baseURL: URL(string: "https://example.piwik.pro")!)
PiwikTracker.sharedInstance()?.sendApplicationDownload()
return true
}- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Configure the tracker in your application delegate
[PiwikTracker sharedInstanceWithSiteID:@"site-id" baseURL:[NSURL URLWithString:@"https://example.piwik.pro"]];
[[PiwikTracker sharedInstance] sendApplicationDownload];
return YES;
}Notes
- Call
sendApplicationDownload()early in your app's launch sequence, immediately after configuring the tracker, for example inApp.init()or inapplication(_:didFinishLaunchingWithOptions:)when you use anAppDelegate. The event is sent only once per combination of app version and build number (per site ID), so calling it on every launch is safe. - This method is replaced by
applicationInstall()(withapplicationUpdate()for tracking subsequent app updates).
Related methods
Updated 14 days ago