# Adjust

## How It Works

If you use Adjust, we recommend using an Adjust link as your GrowSurf campaign Share URL.

This is the URL that referred friends land on when they open up a referral link. Depending on the device they open the link on (web, iOS, or Android), they will either land on a webpage or your App Store / Google Play listing on mobile.

When a participant shares their referral link, the GrowSurf referral code must stay attached to the Adjust link. Your app then passes the Adjust deferred deep link URL into the GrowSurf mobile SDK before calling `addReferredParticipant()`.

***

## How to Set Up

**Step 1:** In GrowSurf, open *Campaign Editor > 5. Installation* and set your Share URL to the Adjust link that routes users to your app.

<figure><img src="/files/0nyYKOIex07fhqgvg1dA" alt=""><figcaption></figcaption></figure>

**Step 2:** Configure the Adjust link so the GrowSurf referral code is returned to your app:

{% stepper %}
{% step %}
In Adjust, go to *TODO* and create or edit the link you entered into your GrowSurf campaign.
{% endstep %}

{% step %}
Scroll to the *TODO* section and make sure that all the fields in iOS and Android redirection are set up properly.
{% endstep %}

{% step %}
Click the *TODO* button.

There's no need to set a custom attribution parameter because Adjust will automatically preserve  `grsf` URL parameters in redirects.
{% endstep %}
{% endstepper %}

**Step 3:** Pass the Adjust deferred deep link URL into the GrowSurf attribution adapter before calling `addReferredParticipant()`.

{% tabs %}
{% tab title="iOS" %}

```swift
import GrowSurfAdjustAttribution

try await GrowSurfAdjustAttribution.handle(adjustDeferredDeepLinkURL, sdk: growsurf)
```

{% endtab %}

{% tab title="Android" %}

```kotlin
import com.growsurf.sdk.attribution.adjust.GrowSurfAdjustAttribution

GrowSurfAdjustAttribution.handle(adjustDeferredDeepLinkUri, growsurf)
```

{% endtab %}
{% endtabs %}

**Step 4:** Call `addReferredParticipant()` after the GrowSurf SDK has handled attribution. This method will validate pending attribution and creates a new referred participant record only when there is a valid referrer.

***

## Additional Tips

* Test both flows before launching:
  * **Installed app flow:** Users who already have your app installed
  * **New install flow:** Users who don't have your app installed
* If the referral code is missing after app install, confirm that the Adjust deferred deep link URL still contains `grsf`, `ref`, or `referredBy`.
* See [iOS SDK Attribution Providers](/developer-tools/ios-sdk/attribution-providers.md), [Android SDK Attribution Providers](/developer-tools/android-sdk/attribution-providers.md), and [Getting Started for Native Mobile](/getting-started-for-native-mobile.md) for more details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.growsurf.com/integrations/adjust.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
