iOS: Set parameters based on the clicked URL domain

At a glance: Set attribution parameters based on click URL

Overview

Organic search attribution can be set from AppsFlyer without updating the SDK. Learn more.

Use the appendParametersToDeepLinkingURL method to dynamically set the media source and other parameters based on the clicked URL domain name.

Prerequisites

  • iOS SDK 6.0.8+.
  • Call this method before calling start.

Usage

Input parameters

TypeNameDescription
NSStringcontainsA domain name to identify URLs
NSDictionaryparametersParameters to append to the deeplink URL after it passed validation

Provide the following parameters in the parameters Map:

  • pid
  • is_retargeting=true

Usage example

AppsFlyerLib.shared().appendParametersToDeeplinkURL(contains: "example.com", parameters: ["pid" : "exampleDomain", "is_retargeting" : true])
[[AppsFlyerLib shared] appendParametersToDeepLinkingURLWithString:@"example.com" @{@"pid" : @"exampleDomain", @"is_retargeting" : @YES}]

In the example above, the attribution URL sent to AppsFlyer servers is:

example.com?pid=exampleDomain&is_retargeting=true