sendOutlink

The sendOutlink() method tells Piwik PRO that the user opened another website or app from youe PP, for example, by tapping a link.Use it to track traffic that leaves your app. Outlink data appears in Analytics outlink reports.

Syntax

PiwikTracker.sharedInstance()?.sendOutlink(url: "url")
[[PiwikTracker sharedInstance] sendOutlink:@"url"];

Parameters

  • url (string, required)
    The outlink URL. Example: https://example.com.

Examples

To track an outlink to https://example.com:

PiwikTracker.sharedInstance()?.sendOutlink(url: "https://example.com")
[[PiwikTracker sharedInstance] sendOutlink:@"https://example.com"];

Notes

  • Call this when you know the user is navigating to the destination URL, for example, right after they tap a link in your UI. The SDK doesn't detect taps or determine whether a URL is external.
  • Pass the actual destination URL you want to measure. The SDK doesn't verify that it belongs to another domain.

Related methods


Did this page help you?