
# Web-to-app funnel

Use this guide when your ads are **website ads** that end in the app: a landing page or quiz with a
"Get the app" button, or an ad that opens your Kerdly link and goes straight to the store. Web
campaigns often cost less than app-install campaigns, and Kerdly closes the loop: it sends the app's
trials and subscriptions back to Meta and TikTok as **website conversions** from its own server, so
the campaigns can optimize for them.

**Example:** Tallybird runs a Meta Sales campaign and a TikTok Website conversions campaign to
`tallybird.example/start`, a 3-question quiz that ends in "Get Tallybird".

## The pieces

| Piece | What it does | You set up |
|---|---|---|
| **Kerdly link** `https://go.kerdly.com/tallybird` | Records the click, then sends iPhones to the App Store, Android phones to Google Play (with the click in the install referrer), computers to a QR page | Copy it from the project page, **Link** card |
| **Landing page** with the web SDK | Records the visit with the ad's click id; its app buttons hand the visitor to the link | `kerdly.js` + `data-kerdly-link` |
| **The app** with the SDK | Records the install; Kerdly matches it to the click | [App guide](https://kerdly.com/docs/guides/store-app.md) steps 1 to 7 |
| **Postbacks** to the website dataset / pixel | Send the link click and the app's trials and subscriptions to Meta and TikTok as website events | The app's **Settings → Postbacks** |

## 1. Get your Kerdly link

Open the project page in the dashboard. The **Link** card shows the project's link,
`https://go.kerdly.com/<name>`, and lets you rename it (old names keep working, so running ads
never break). One link serves every network, platform and ad: which network and campaign a click
came from is read from the click itself.

Want it on your own domain, such as `go.tallybird.example`? Ask Kerdly support; we send you the DNS
record to add.

## 2. iOS: one custom product page per network (recommended)

On iOS the App Store passes nothing from the click to the app, so a web-to-app install can only be
matched to its click probabilistically. Give each network its own **custom product page**, and the
install names its network for certain:

1. In App Store Connect, create custom product pages for the networks you run: one each for Meta,
   TikTok, Google and ChatGPT, plus one for other traffic and one for organic.
2. Give each page a **deep link** your app opens, ending in `cpp=web-<key>`:
   `tallybird://open?cpp=web-meta`, `…cpp=web-tiktok`, `…cpp=web-google`, `…cpp=web-chatgpt`,
   `…cpp=web-other`, `…cpp=web-organic`.
3. The Kerdly link then sends each network's clicks to its page, with a campaign token
   (`w2a_meta`, …) that App Analytics counts downloads by.

Without these pages the link sends everyone to your default App Store page, and iOS installs are
matched probabilistically only.

Android needs nothing: the click travels in Google Play's install referrer, and the match is exact.

## 3. Build the landing page

```html
<head>
  <script src="https://cdn.kerdly.com/v1/kerdly.js" data-key="wk_live_…" async></script>
</head>
<body>
  …your quiz…
  <a href="https://go.kerdly.com/tallybird" data-kerdly-link>Get Tallybird</a>
</body>
```

- The SDK records the visit with the URL's `fbclid` / `ttclid` and UTM tags, and writes Meta's `_fbc`.
- `data-kerdly-link` records the click and adds the visitor id (`kerdly_v`) to the link, so the link's
  click continues the visitor's chain: the ad that brought them to the page is the ad the install is
  credited to.
- Use the Kerdly link on every app button, not plain store links: a plain App Store link loses the
  click.
- If your page runs the Meta or TikTok pixel, fire its events with ids from `kerdly.eventId(name)`;
  Kerdly's server copies use the same ids (see step 6).

**Your server redirects to the store instead?** If an app button hits your own endpoint (say
`/app-start`) that redirects to the store, either redirect to the Kerdly link, or report each click
from your server with `POST /v1/s2s/touchpoints` and turn on **Website postbacks for forwarded
clicks** in the project's settings.

## 4. Set up the ads

Put the landing page (or the Kerdly link itself, to skip the page) in the ad, with the parameters
that name the network and campaign. The **Link** card has them ready to copy for each network.

### Meta

Campaign objective **Sales** (or Traffic / Leads), conversion location **Website**, your website
dataset (pixel). In the ad, under **Destination**:

- **Website URL**: `https://tallybird.example/start`
- **URL parameters**:

```text
utm_source=meta&utm_medium=paid&campaign_id={{campaign.id}}&adset_id={{adset.id}}&ad_id={{ad.id}}&campaign_name={{campaign.name}}&adset_name={{adset.name}}&ad_name={{ad.name}}&placement={{placement}}&site={{site_source_name}}
```

Put the parameters in **URL parameters**, not in the Website URL: Meta can strip a query typed into
the URL itself. Meta adds `fbclid` on its own.

### TikTok

Objective **Website conversions**, your web pixel. In the ad, the **Destination URL** takes the URL
and the parameters together:

```text
https://tallybird.example/start?utm_source=tiktok&utm_medium=paid&campaign_id=__CAMPAIGN_ID__&adgroup_id=__AID__&ad_id=__CID__&campaign_name=__CAMPAIGN_NAME__&adgroup_name=__AID_NAME__&ad_name=__CID_NAME__&placement=__PLACEMENT__
```

TikTok adds `ttclid` on its own.

### Straight to the store

To skip the landing page, use the Kerdly link as the Website URL / Destination URL with the same
parameters. The click is recorded at the link and the person lands in the store.

## 5. Add the SDK to the app

Follow [App with App Store and Google Play billing](https://kerdly.com/docs/guides/store-app.md), steps 1 to 7: the keys,
the stores, the SDK, `setUserId`, and linking purchases. Nothing web-specific is needed in the app.

## 6. Send conversions back from Kerdly's server

This is the server tracking: Kerdly, not the browser, tells the networks what happened after the
click.

1. In the **app's Settings → Postbacks**, add a **Meta website dataset** destination (your pixel's
   dataset) and a **TikTok web pixel** destination. Use the same dataset and pixel as the
   campaign.
2. Map the events:
   - **Link click** → for example `InitiateCheckout` (Meta) / `ClickButton` (TikTok): sent the moment
     someone taps through to the store, so the campaign gets a signal right away.
   - **Trial start** → `StartTrial`, **First subscription** → `Subscribe` (or `Purchase`), from the
     store's records once the app reports them.
3. Turn the destination live.

Each event carries the click's page URL, IP, user agent and the network's own keys (`fbc` / `fbp`,
`ttclid` / `ttp`), plus a hashed visitor id as the external id, so the network matches it to the
person who clicked.

Which installs send website events:

| Install matched by | Sent |
|---|---|
| Android: the Play install referrer carrying the click | Yes |
| iOS: the network's custom product page, plus a probabilistic match to the click | Yes |
| A probabilistic match alone | Only if you turn on **Website postbacks also for probabilistic installs** in the project's settings |

**Deduplication with your pixel.** Website events go out with the id `<visitor id>:<event name>`,
the same value `kerdly.eventId("<event name>")` returns on the page. If the page fires the pixel for
the same event with that id, Meta and TikTok count it once. If you don't fire it in the browser,
there is nothing to deduplicate.

## 7. Check it

1. On a phone, open `https://tallybird.example/start?utm_source=meta&utm_medium=paid&campaign_id=test`,
   tap **Get Tallybird**, install the build, and start a sandbox trial.
2. The project's link clicks show the click; the app's Onboarding page shows the install; the
   install's attribution names `meta` and campaign `test`.
3. The postback destination's activity shows the link click and the trial sent (live destinations
   skip sandbox purchases; use a test destination to see them).

## Agent checklist

- [ ] Web SDK on the landing page; every app button is the Kerdly link with `data-kerdly-link`.
- [ ] No plain App Store / Play links on the page.
- [ ] Ads carry the network's parameter template (Meta in **URL parameters**, TikTok in the URL).
- [ ] iOS: custom product pages with deep links `…cpp=web-<network>`.
- [ ] App integrated per the app guide; `notifyPurchase` in place.
- [ ] Postbacks: Meta website dataset and TikTok web pixel destinations on the app, link click,
      trial and subscription mapped.
- [ ] Pixel events (if any) use `kerdly.eventId(name)`.

---

Source: https://kerdly.com/docs/guides/web-to-app. Index of all docs: https://kerdly.com/llms.txt
