For the complete documentation index, see llms.txt. This page is also available as Markdown.

Attribution Providers

Configure direct deep links, Google Play Install Referrer, and attribution adapters for the GrowSurf Android SDK.

On Android, GrowSurf can capture referral attribution from direct deep links, Google Play Install Referrer, or provider callback payloads. Capture attribution before calling addReferredParticipant().


Use handleDeepLink(uri) when the installed app opens from a link that already contains grsf, which contains the referral code.

intent.data?.let { uri ->
    val attribution = growsurf.handleDeepLink(uri)
}

Example accepted links:

  • your-app://open?grsf=referrer_id

  • https://piedpiper.com/app?grsf=referrer_id

Already support deep links? If you use an attribution provider (Branch, AppsFlyer, Adjust, Singular) or otherwise open your app from links, this is already set up. Forward the opened Intent's URI to handleDeepLink(uri).

Starting from scratch? Add a custom-scheme <intent-filter> (android:scheme) to your launch Activity in AndroidManifest.xml (the quickest path; no domain needed) and/or set up Android App Links (android:autoVerify="true" plus an assetlinks.json hosted on a domain you control) for verified https links. Then read intent.data in onCreate/onNewIntent and call handleDeepLink(uri) inside a coroutine scope.

GrowSurf-hosted share links live on grow.surf (not your domain), so they can't open your app via App Links. Use a custom scheme, your own domain with grsf appended, or an attribution provider.


Google Play Install Referrer

When Android referral clicks route to Google Play with a Play Install Referrer payload, addReferredParticipant(...) checks the install referrer once when no explicit or pending attribution exists. You can also call handleDeferredDeepLink() yourself before signup when you want to inspect the attribution result.

While testing, pass forceRefresh = true to check the install referrer again:


Adapters

GrowSurf provides adapters for popular attribution providers. Choose your provider below, or use Other to pass a dictionary of attribution values from any other provider.

Adjust adapter

Add the adapter artifact:

Then pass the Adjust deferred deep link into GrowSurf:

The adapter accepts Uri and String deep link values.

AppsFlyer adapter

Add the adapter artifact:

Then pass AppsFlyer conversion data into GrowSurf:

The adapter accepts Map<String, *> and JSONObject payloads.

Branch adapter

Add the adapter artifact:

Then pass Branch callback data into GrowSurf:

The adapter accepts Map<String, *> and JSONObject payloads.

Singular adapter

Add the adapter artifact:

Then pass Singular callback data into GrowSurf:

The adapter accepts Map<String, *>, JSONObject, Uri, and String payloads. It parses GrowSurf referral keys from Singular deep link, deferred deep link, and passthrough fields such as _dl, _ddl, and _p.

Manual attribution parameters

Use handleAttributionParameters(parameters, provider) for any other provider that can return a dictionary of attribution values. No extra adapter install is required.


Accepted attribution keys

Key
Description

grsf

Preferred GrowSurf referrer ID.

ref

Alternate referrer ID.

referredBy

Alternate referrer ID.

provider

Attribution provider name. Ignored when the SDK method receives an explicit provider argument.

clickId

Provider click ID metadata.

click_id

Provider click ID metadata.

unique

Optional boolean string: true or false.

The SDK also parses values nested inside URL-like payload fields. For example, a provider value of https://piedpiper.com/?grsf=referrer_id&click_id=click_123 can still produce GrowSurf attribution. If a provider returns a GrowSurf-hosted share URL such as https://grow.surf/share/:campaignId/:referrerId, the SDK uses the participant value from the path.

Last updated

Was this helpful?