> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkrunner.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Why is my test credited to the wrong campaign?

Source: https://docs.linkrunner.io/testing/testing-attribution-troubleshooting

Fix the common issue where test installs or signups get attributed to a previously tested campaign link instead of the new one

## The Problem

You click a new campaign link and test a signup, but the dashboard attributes it to a **different campaign**, usually an older test link with a stale date.

## Why This Happens

The SDK generates a unique **install instance ID** on first launch and persists it on the device. All subsequent activity (installs, signups, events) is tied to this ID. When you test again **without uninstalling**, the SDK reuses the same ID and the backend attributes everything to the original campaign.

**No uninstall = same ID = attribution stuck on the first campaign.**

## How to Fix It

### 1. Uninstall the app before each test

This clears the stored install instance ID so a fresh one is generated on next launch.

> **Warning:**
>
> Force-stopping the app is **not enough**. You must fully uninstall it.

### 2. Enable debug mode

Set `debug = true` in your SDK init to see logs confirming a fresh install.

**Android**

```kotlin
LinkRunner.getInstance().init(
    context = applicationContext, token = "TOKEN",
    secretKey = "SECRET", keyId = "KEY_ID", debug = true
)
```

**iOS**

```swift
await LinkrunnerSDK.shared.initialize(
    token: "TOKEN", secretKey: "SECRET", keyId: "KEY_ID",
    disableIdfa: false, debug: true
)
```

**React Native**

```javascript
await linkrunner.init("TOKEN", "SECRET", "KEY_ID", false, true);
```

**Flutter**

```dart
await LinkRunner().init('TOKEN', 'SECRET', 'KEY_ID', false, true);
```

### 3. Run the test flow

1. **Click** your new campaign link on the test device
2. **Install** and **open** the app. The click must land before the first app open
3. **Signup** (if testing signup attribution)

> **Tip:**
>
> **Multiple tests?** Uninstall between each run for clean attribution.

## Still seeing issues?

- Confirm you clicked the link **on the same device** where the app is installed
- Confirm you **clicked the link before opening the app**. A click that lands after the install is never matched to it
- See the full [Integration Testing guide](https://docs.linkrunner.io/testing/integration-testing) for a detailed walkthrough

**Need help?** Contact <support@linkrunner.io>.
